Skip to content

Commit

Permalink
feat(build): Enable Docker image versioning
Browse files Browse the repository at this point in the history
Currently, we're building on release aka tags only anyway, so release
three (plus `latest`) corresponding tags, to point to major/minor/patch.

Closes #23
  • Loading branch information
alexpovel committed Sep 4, 2022
1 parent 140bbcc commit 8a34b35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ jobs:
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
Expand Down
2 changes: 1 addition & 1 deletion self-hosting/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- 443:443
restart: unless-stopped
ancv:
image: ghcr.io/alexpovel/ancv:main
image: ghcr.io/alexpovel/ancv:1
volumes:
- ./resume.json:/resume.json:ro
ports:
Expand Down

0 comments on commit 8a34b35

Please sign in to comment.