From dc91aa4b95db9ba4929b5f4c44284c33a90df655 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Tue, 17 Sep 2024 16:14:05 +0200 Subject: [PATCH] allow github actions to manually push specific tagged images --- .github/workflows/ci-build-manual-crf.yml | 9 +++++---- .github/workflows/ci-build-manual-full.yml | 12 +++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-build-manual-crf.yml b/.github/workflows/ci-build-manual-crf.yml index 6606f0bfd1..d794f4d663 100644 --- a/.github/workflows/ci-build-manual-crf.yml +++ b/.github/workflows/ci-build-manual-crf.yml @@ -3,10 +3,11 @@ name: Build and push a CRF-only docker image on: workflow_dispatch: inputs: - suffix: + custom_tag: type: string - description: Docker image suffix (e.g. develop, crf, full) - required: false + description: Docker image tag + required: true + default: "latest-crf" jobs: build: @@ -42,6 +43,6 @@ jobs: registry: docker.io pushImage: true tags: | - latest-develop, latest-crf${{ github.event.inputs.suffix != '' && '-' || '' }}${{ github.event.inputs.suffix }} + latest-develop, ${{ github.event.inputs.custom_tag}} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/ci-build-manual-full.yml b/.github/workflows/ci-build-manual-full.yml index ce1a0a175b..9ba70d16dc 100644 --- a/.github/workflows/ci-build-manual-full.yml +++ b/.github/workflows/ci-build-manual-full.yml @@ -1,7 +1,13 @@ name: Build and push a full docker image -on: "workflow_dispatch" - +on: + workflow_dispatch: + inputs: + custom_tag: + type: string + description: Docker image tag + required: true + default: "latest-full" jobs: build: @@ -35,7 +41,7 @@ jobs: image: lfoppiano/grobid registry: docker.io pushImage: true - tags: latest-full + tags: latest-full, ${{ github.event.inputs.custom_tag}} dockerfile: Dockerfile.delft - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }}