From 112a537f3a5caf49bd374800c02b8de51eca6312 Mon Sep 17 00:00:00 2001 From: Karl Johan Grahn <6355577+karl-johan-grahn@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:22:00 +0100 Subject: [PATCH] Fix bug with empty image path (#140) fix bug with empty image path --- .github/workflows/pull_request_container_build.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request_container_build.yaml b/.github/workflows/pull_request_container_build.yaml index d28bd83..dd6dfaf 100644 --- a/.github/workflows/pull_request_container_build.yaml +++ b/.github/workflows/pull_request_container_build.yaml @@ -17,10 +17,11 @@ on: default: "" required: false type: string - secrets: CONTAINER_REGISTRY_URL: description: "Container registry to publish docker image" required: true + type: string + secrets: CONTAINER_REGISTRY_USERNAME: description: "Username to login to container registry" required: true @@ -56,7 +57,7 @@ jobs: - name: Generate image repository path id: image_repo_path run: | - echo "IMAGE_REPOSITORY=$(echo ${{ secrets.CONTAINER_REGISTRY_URL }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT + echo "IMAGE_REPOSITORY=$(echo ${{ inputs.CONTAINER_REGISTRY_URL }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT - name: Generate image tag id: generate_tag @@ -81,7 +82,7 @@ jobs: - name: Login to Registry uses: docker/login-action@v3 with: - registry: ${{ secrets.CONTAINER_REGISTRY_URL }} + registry: ${{ inputs.CONTAINER_REGISTRY_URL }} username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}