Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GHA] Add support for arbitrary DEPLOYMENT_TOKEN. #287

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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