Match tags from InVEST #2221
This file contains 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: Match tags from InVEST | |
on: | |
push: # Also check for tags when pushed. | |
branches: | |
- main | |
schedule: # Check for new tags daily. | |
- cron: '0 0 * * *' | |
jobs: | |
check-invest-tags: | |
name: Compare tags with InVEST | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Fetch all revisions across all branches | |
fetch-depth: 0 | |
- run: git fetch origin +refs/tags/*:refs/tags/* | |
- name: Check out InVEST | |
uses: actions/checkout@v4 | |
with: | |
repository: natcap/invest | |
path: invest-src | |
- name: Fetch tags for InVEST | |
run: git -C invest-src fetch origin +refs/tags/*:refs/tags/* | |
- name: Add any needed tags to the UG | |
run: ./.github/workflows/match-invest-tags.sh | |
- name: Push new tags back to UG | |
run: | | |
for NEW_TAG in `cat new_tags.txt` | |
do | |
git push https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git $NEW_TAG | |
done |