Skip to content

Commit 9fd63b1

Browse files
committed
Checkpoint
Pre-commit checks: All checks passed ✅
1 parent 98e33af commit 9fd63b1

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/common_run_tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ jobs:
4949
# uses: aws-actions/amazon-ecr-login@v1
5050

5151
# This is needed to pull the docker image from GHCR.
52-
- name: Login to GHCR
53-
run: |
54-
echo "${{ secrets.GH_ACTION_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}" \
55-
| docker login ghcr.io -u ${{ github.actor }} --password-stdin
52+
# Use GH_ACTION_ACCESS_TOKEN if defined, otherwise fall back to the built-in GITHUB_TOKEN.
53+
- name: Login to GHCR (with GH_ACTION_ACCESS_TOKEN if present)
54+
if: ${{ secrets.GH_ACTION_ACCESS_TOKEN != '' }}
55+
run: echo "${{ secrets.GH_ACTION_ACCESS_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
56+
57+
- name: Login to GHCR (fallback to GITHUB_TOKEN)
58+
if: ${{ secrets.GH_ACTION_ACCESS_TOKEN == '' }}
59+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
5660

5761
# Make everything accessible by any user to avoid permission errors.
5862
- name: Cleanup

0 commit comments

Comments
 (0)