Skip to content

Commit

Permalink
Pass secrets into docker build via native env.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rj1k committed Jun 22, 2024
1 parent 3dc18db commit cd13a29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/actions/docker-build-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ inputs:
runs:
using: "composite"
steps:

- name: Set up QEMU for Docker
uses: docker/setup-qemu-action@v3

- name: Build Docker image
shell: bash
working-directory: ${{ inputs.WORKING_DIRECTORY }}
env:
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
DEPLOYMENT_TOKEN: ${{ secrets.DEPLOYMENT_TOKEN }}
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 }}" \
Expand Down

0 comments on commit cd13a29

Please sign in to comment.