File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments