From fab4e548d4914788380206f019debdeb6092e278 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 6 Sep 2022 00:48:24 +0200 Subject: [PATCH] Fix publish images action (#11258) Signed-off-by: Julien Pivotto Signed-off-by: Julien Pivotto --- .github/actions/publish_images/action.yml | 10 +++++++--- .github/actions/publish_release_image/action.yml | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/actions/publish_images/action.yml b/.github/actions/publish_images/action.yml index fd21fd22d..e3a8693fb 100644 --- a/.github/actions/publish_images/action.yml +++ b/.github/actions/publish_images/action.yml @@ -30,12 +30,15 @@ runs: - name: Download all workflow run artifacts uses: actions/download-artifact@v3 - uses: ./.github/actions/setup_environment - - if: inputs.dockerfile_path != "" + - if: "inputs.dockerfile_path != ''" run: echo "export DOCKERFILE_PATH=${{ inputs.dockerfile_path }}" >> /tmp/tmp-profile - - if: inputs.container_image_name != "" + shell: bash + - if: "inputs.container_image_name != ''" run: echo "export DOCKER_IMAGE_NAME=${{ inputs.container_image_name }}" >> /tmp/tmp-profile - - if: inputs.dockerbuild_context != "" + shell: bash + - if: "inputs.dockerbuild_context != ''" run: echo "export DOCKERBUILD_CONTEXT=${{ inputs.dockerbuild_context }}" >> /tmp/tmp-profile + shell: bash - run: | touch /tmp/tmp-profile . /tmp/tmp-profile @@ -44,3 +47,4 @@ runs: echo ${{ inputs.password }} | docker login -u ${{ inputs.login }} --password-stdin ${{ inputs.registry }} make docker-publish DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} make docker-manifest DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} + shell: bash diff --git a/.github/actions/publish_release_image/action.yml b/.github/actions/publish_release_image/action.yml index f8b8ab1ee..c40664692 100644 --- a/.github/actions/publish_release_image/action.yml +++ b/.github/actions/publish_release_image/action.yml @@ -30,12 +30,15 @@ runs: - name: Download all workflow run artifacts uses: actions/download-artifact@v3 - uses: ./.github/actions/setup_environment - - if: inputs.dockerfile_path != "" + - if: "inputs.dockerfile_path != ''" run: echo "export DOCKERFILE_PATH=${{ inputs.dockerfile_path }}" }} /tmp/tmp-profile - - if: inputs.container_image_name != "" + shell: bash + - if: "inputs.container_image_name != ''" run: echo "export DOCKER_IMAGE_NAME=${{ inputs.container_image_name }}" }} /tmp/tmp-profile - - if: inputs.dockerbuild_context != "" + shell: bash + - if: "inputs.dockerbuild_context != ''" run: echo "export DOCKERBUILD_CONTEXT=${{ inputs.dockerbuild_context }}" }} /tmp/tmp-profile + shell: bash - run: | current_tag=${GITHUB_REF#refs/*/} touch /tmp/tmp-profile @@ -50,3 +53,4 @@ runs: make docker-publish DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ input.registry }}/${{ input.organization }} make docker-manifest DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ input.registry }}/${{ input.organization }} fi + shell: bash