diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7ae55bb..06411b4 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -32,7 +32,7 @@ jobs: - version permissions: packages: write - contents: read + contents: write steps: - uses: actions/checkout@v4 - name: Build Docker image @@ -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 + }) diff --git a/docker-compose.yml b/docker-compose.yml index 91e1250..2522bb6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,7 @@ services: - 83:8080 volumes: - ./:/app + dev: image: ghcr.io/nationalarchives/tna-python-dev:preview volumes: