Skip to content

Match tags from InVEST #2200

Match tags from InVEST

Match tags from InVEST #2200

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