update #156
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 Metadata Files | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'README.md' | |
| jobs: | |
| update-metadata: | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Update metadata files | |
| run: | | |
| REPO_NAME="${GITHUB_REPOSITORY#*/}" | |
| REPO_DESC=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
| https://api.github.com/repos/$GITHUB_REPOSITORY | jq -r .description) | |
| if [ -f .zenodo.json ]; then | |
| jq --arg title "$REPO_NAME" '.title = $title' .zenodo.json > .zenodo.json.tmp | |
| jq --arg desc "$REPO_DESC" '.description = $desc' .zenodo.json.tmp > .zenodo.json | |
| fi |