Skip to content

Commit

Permalink
chore: add tag to ghcr package
Browse files Browse the repository at this point in the history
  • Loading branch information
micha37-martins committed Sep 12, 2024
1 parent e81e78f commit 34eead4
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/github-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches:
- master
- dev
tags:
- "*.*.*"

jobs:
coverage:
Expand Down Expand Up @@ -78,6 +80,21 @@ jobs:
permissions:
packages: write
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
micha37-martins/smartmon
ghcr.io/micha37-martins/smartmon
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Checkout code
uses: actions/checkout@v3.6.0

Expand All @@ -95,11 +112,9 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker container
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/smartmon:latest
ghcr.io/${{ github.repository_owner }}/smartmon:${{ steps.latest_tag.outputs.tag }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 34eead4

Please sign in to comment.