From a30beacfe999fb0ec645bd229178c3d031bfdefa Mon Sep 17 00:00:00 2001 From: TrekkieCoder <111065900+TrekkieCoder@users.noreply.github.com> Date: Mon, 11 Mar 2024 09:52:59 +0900 Subject: [PATCH] Update docker-multiarch.yml --- .github/workflows/docker-multiarch.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-multiarch.yml b/.github/workflows/docker-multiarch.yml index 1678b605..24157f3c 100644 --- a/.github/workflows/docker-multiarch.yml +++ b/.github/workflows/docker-multiarch.yml @@ -4,6 +4,11 @@ on: push: branches: [ "main" ] workflow_dispatch: + inputs: + tagName: + description: 'Tag Name' + required: true + default: 'latest' jobs: build: @@ -39,12 +44,25 @@ jobs: push: false tags: ghcr.io/loxilb-io/loxilb:latest - - name: Build and push + - name: Build and push to latest if: | - github.repository == 'loxilb-io/loxilb' + github.repository == 'loxilb-io/loxilb' + && github.event.inputs.tagName == '' uses: docker/build-push-action@v4 with: context: . platforms: linux/amd64, linux/arm64 push: true tags: ghcr.io/loxilb-io/loxilb:latest + + - name: Build and push to given tag + if: | + github.repository == 'loxilb-io/loxilb' + && github.event.inputs.tagName != '' + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64, linux/arm64 + push: true + tags: ghcr.io/loxilb-io/loxilb:${{ github.event.inputs.tagName }} +