From aca6b1e931107d3e20d5486ce24d5284d5427952 Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Thu, 4 Apr 2024 17:01:49 +0200 Subject: [PATCH] Use `env` to pass secret into docker, env field does not handle escapes. --- .github/actions/docker-build-artifacts/action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/actions/docker-build-artifacts/action.yml b/.github/actions/docker-build-artifacts/action.yml index 39fc3b53..e7f3d88a 100644 --- a/.github/actions/docker-build-artifacts/action.yml +++ b/.github/actions/docker-build-artifacts/action.yml @@ -40,10 +40,8 @@ runs: - name: Build Docker image shell: bash working-directory: ${{ inputs.WORKING_DIRECTORY }} - env: - REPO_PASSWORD: ${{ env.REPO_PASSWORD }} run: | - docker build \ + env REPO_PASSWORD='${{ env.REPO_PASSWORD }}' docker build \ --build-arg BUILD_NUMBER="${GITHUB_RUN_ID}" \ --build-arg GIT_SHA="$(echo ${GITHUB_SHA} | cut -c1-10)" \ --build-arg MAINTAINER="${{ inputs.MAINTAINER }}" \