Browse Source

Fix publish images action (#11258)

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
pull/11260/head
Julien Pivotto 2 years ago committed by GitHub
parent
commit
fab4e548d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      .github/actions/publish_images/action.yml
  2. 10
      .github/actions/publish_release_image/action.yml

10
.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

10
.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

Loading…
Cancel
Save