Skip to content

Commit

Permalink
update docker image github action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
khakers committed Dec 16, 2023
1 parent 61336bc commit 6593675
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

name: Create and publish a Docker image
name: Docker image

on:
push:
branches: ['master']
branches:
- 'oldstable'
tags:
- 'v*'

env:
REGISTRY: ghcr.io
Expand All @@ -20,6 +23,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -32,11 +38,25 @@ jobs:
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
suffix=-legacy
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64,linux/arm64, linux/arm64/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
sbom: true
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 6593675

Please sign in to comment.