Update DataCite Media from CaltechDATA #84
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update DataCite Media from CaltechDATA | |
| on: | |
| schedule: | |
| - cron: '10 15 * * 1-5' | |
| workflow_dispatch: | |
| inputs: | |
| reason: | |
| description: 'Reason' | |
| required: false | |
| default: 'Manual trigger' | |
| jobs: | |
| update-media: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Install Python | |
| run: uv python install | |
| - name: setup venv | |
| run: uv venv | |
| - name: Python Deps | |
| shell: bash | |
| run: uv pip install -r requirements.txt | |
| - name: Update DataCite Media | |
| shell: bash | |
| env: | |
| DATACITE: "${{ secrets.DATACITE }}" | |
| CALTECHDATA_DATACITE: "${{ secrets.CALTECHDATA_DATACITE }}" | |
| INVENIO_TOKEN: ${{ secrets.INVENIO_TOKEN }} | |
| run: uv run run_media_update.py | |
| - name: Commit and Push Changes | |
| id: commit-and-push | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: 'Update mediaupdate date' | |
| file_pattern: 'mediaupdate' |