Version Charts (#487) #113
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: Version Charts | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/kubernetes-agent/v* | |
| paths: | |
| - charts/kubernetes-agent/** | |
| - .github/workflows/tag-agent.yaml | |
| jobs: | |
| tag: | |
| runs-on: ubuntu-latest | |
| # When a changesets generated Versioning PR is merged, we want to publish the version as a tag | |
| if: ${{ startsWith(github.event.commits[0].message, 'Version Charts') }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.CHANGESETS_GITHUB_TOKEN }} | |
| - name: 'Tag version' | |
| run: | | |
| version=$(jq -r .version charts/kubernetes-agent/package.json) | |
| tag="kubernetes-agent/$version" | |
| git tag $tag | |
| git push origin refs/tags/$tag |