Skip to content

Commit

Permalink
ci: use metadata action to generate better tags for Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainweb committed Oct 24, 2022
1 parent 6ec74a8 commit 85ceb8a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
axelerant/template
tags: |
type=semver,pattern={{raw}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -24,4 +35,4 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
tags: axelerant/template:latest
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 85ceb8a

Please sign in to comment.