Skip to content

Commit

Permalink
Merge pull request #287 from signalwire/deployment_token
Browse files Browse the repository at this point in the history
[GHA] Add support for arbitrary `DEPLOYMENT_TOKEN`.
  • Loading branch information
andywolk authored May 23, 2024
2 parents 8270f50 + 5cdf35b commit 22c2fb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/actions/docker-build-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runs:
shell: bash
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: |
env REPO_PASSWORD='${{ env.REPO_PASSWORD }}' docker build \
env REPO_PASSWORD='${{ env.REPO_PASSWORD }}' DEPLOYMENT_TOKEN='${{ env.DEPLOYMENT_TOKEN }}' 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 All @@ -51,6 +51,7 @@ runs:
--platform linux/${{ inputs.PLATFORM }} \
--progress=plain \
--secret id=REPO_PASSWORD,env=REPO_PASSWORD \
--secret id=DEPLOYMENT_TOKEN,env=DEPLOYMENT_TOKEN \
--tag artifacts-${GITHUB_RUN_ID}:${GITHUB_SHA} \
--ulimit nofile=1024000:1024000 \
. 2>&1 | tee -a ${{ inputs.BUILD_LOG_FILENAME }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/cicd-docker-build-and-distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ on:
required: true
USERNAME:
required: true
REPO_USERNAME:
required: false
REPO_PASSWORD:
required: false
REPO_USERNAME:
DEPLOYMENT_TOKEN:
required: false
GH_BOT_DEPLOY_TOKEN:
required: true
Expand Down Expand Up @@ -135,6 +137,7 @@ jobs:
env:
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
DEPLOYMENT_TOKEN: ${{ secrets.DEPLOYMENT_TOKEN }}

- name: Upload build logs
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 22c2fb5

Please sign in to comment.