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 5f02c02 commit 97917a4
Show file tree
Hide file tree
Showing 2 changed files with 13 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 @@ -32,7 +32,7 @@ jobs:
- version
permissions:
packages: write
contents: read
contents: write
steps:
- uses: actions/checkout@v4
- name: Build Docker image
Expand All @@ -42,3 +42,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
})
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
- 83:8080
volumes:
- ./:/app

dev:
image: ghcr.io/nationalarchives/tna-python-dev:preview
volumes:
Expand Down

0 comments on commit 97917a4

Please sign in to comment.