Skip to content

Commit

Permalink
Create tag on build
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Dec 5, 2024
1 parent 4c85b28 commit 4d0c539
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,6 +50,17 @@ 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
})
update-ds-infrastructure-web:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4d0c539

Please sign in to comment.