Update dataset version #5
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 repository version on dataset update | |
| run-name: Update dataset version | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [master] | |
| paths: | |
| - registry-data/namespaces/*.json | |
| - registry-data/full.json | |
| jobs: | |
| update-release-version: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update version date | |
| run: date +"%Y-%m-%d" > VERSION | |
| - name: Commit new version | |
| run: | | |
| if ! git diff --quiet VERSION; then | |
| git config --local user.name "Registry Bot" | |
| git config --local user.email "identifiers-org@ebi.ac.uk" | |
| git add VERSION | |
| git commit -m 'Update repository dataset version' | |
| fi | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |