From 6593675e0b48ec8f4ad6d4cb91af28d116bbabc2 Mon Sep 17 00:00:00 2001 From: khakers <22665282+khakers@users.noreply.github.com> Date: Sat, 16 Dec 2023 20:02:07 +0000 Subject: [PATCH] update docker image github action workflow --- .github/workflows/docker-image.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 6af8630b385..1eb419ad70f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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 @@ -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: @@ -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 +