Skip to content

Commit

Permalink
Add tag on build
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Dec 5, 2024
1 parent d9791f8 commit cd183c0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- version
permissions:
packages: write
contents: read
contents: write
steps:
- uses: actions/checkout@v4
- name: Build Docker image
Expand All @@ -50,3 +50,14 @@ jobs:
latest: ${{ github.ref == 'refs/heads/main' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
docker-image-name: ${{ vars.DOCKER_IMAGE_NAME }}
- name: Create tag
if: github.ref == 'refs/heads/main'
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/v${{ needs.version.outputs.version }}',
sha: context.sha
})

0 comments on commit cd183c0

Please # to comment.