Skip to content

Commit

Permalink
Merge pull request #4 from Kurrawong/edmond/update
Browse files Browse the repository at this point in the history
Improve container image versioning
  • Loading branch information
edmondchuc authored Jan 23, 2024
2 parents 90efcb7 + 35a8d27 commit ff49636
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Docker meta
uses: zazuko/action-docker-meta@main
id: docker_meta
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: latest

- name: Get release version
id: version
run: echo "VALUE=$(npx --yes semver ${{ github.event.release.tag_name }})" >> "$GITHUB_OUTPUT"

- name: Docker metadata
id: metadata
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -40,8 +53,8 @@ jobs:
context: .
file: Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
# Set provenance to false due to issue documented here: https://github.com/docker/build-push-action/issues/778
provenance: false
platforms: linux/amd64,linux/arm64

0 comments on commit ff49636

Please sign in to comment.