Update Base Tag on Release #2
Workflow file for this run
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 Base Tag on Release | |
| on: | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| update-tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Update Base Tag | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Extract the release tag name | |
| TAG_NAME=${{ github.event.release.tag_name }} | |
| echo "Updating base tag to point to release tag: $TAG_NAME" | |
| # Fetch all branches and tags | |
| git fetch --all | |
| # Create or move the base tag to point to the release tag | |
| git checkout -B v1 $TAG_NAME | |
| # Push the updated base tag | |
| git push origin v1 --force |