From ed952d6adba9a79b01c64001fcd3f4cc53d519d8 Mon Sep 17 00:00:00 2001 From: James D Bloom <733179+jamesdbloom@users.noreply.github.com> Date: Sun, 21 Aug 2022 07:37:00 +0100 Subject: [PATCH] attempt to make docker push action workflow more testable / manually runnable --- .github/workflows/build-docker-image.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index d7cf90eb6..c06ed70c4 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -1,5 +1,9 @@ name: Build and push Docker image to Docker Hub on: + workflow_dispatch: + tags: + description: 'Docker image tag' + required: true push: tags: - mockserver-* @@ -11,7 +15,15 @@ jobs: - uses: actions/checkout@v3 - name: Get tag name id: get_tag_version - run: echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}" + shell: bash + run: | + if [ "$DOCKER_TAG" == "" ]; then + echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}" + else + echo "::set-output name=version::${DOCKER_TAG}" + fi + env: + DOCKER_TAG: ${{ github.event.inputs.logLevel }} - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx