diff --git a/.github/actions/docker-build-artifacts/action.yml b/.github/actions/docker-build-artifacts/action.yml index 36046bb4..1571eca2 100644 --- a/.github/actions/docker-build-artifacts/action.yml +++ b/.github/actions/docker-build-artifacts/action.yml @@ -33,15 +33,34 @@ inputs: runs: using: "composite" steps: - - name: Set up QEMU for Docker uses: docker/setup-qemu-action@v3 + - name: Set up Python + uses: actions/setup-python@v5 + + - name: Append REPO_PASSWORD and DEPLOYMENT_TOKEN to GITHUB_ENV + env: + REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }} + DEPLOYMENT_TOKEN: ${{ secrets.DEPLOYMENT_TOKEN }} + shell: python + run: | + import os + + env_vars = { + 'REPO_PASSWORD': os.getenv('REPO_PASSWORD'), + 'DEPLOYMENT_TOKEN': os.getenv('DEPLOYMENT_TOKEN') + } + + with open(os.getenv('GITHUB_ENV'), 'at') as github_env: + for key, value in env_vars.items(): + github_env.write(f"{key}={value}\n") + - name: Build Docker image shell: bash working-directory: ${{ inputs.WORKING_DIRECTORY }} run: | - env REPO_PASSWORD='${{ env.REPO_PASSWORD }}' DEPLOYMENT_TOKEN='${{ env.DEPLOYMENT_TOKEN }}' docker build \ + docker build \ --build-arg BUILD_NUMBER="${GITHUB_RUN_ID}" \ --build-arg GIT_SHA="$(echo ${GITHUB_SHA} | cut -c1-10)" \ --build-arg MAINTAINER="${{ inputs.MAINTAINER }}" \