Skip to content

Commit

Permalink
More GHCR login steps
Browse files Browse the repository at this point in the history
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
  • Loading branch information
1tnguyen committed Oct 25, 2024
1 parent 2454adb commit e8a7812
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_READONLY_TOKEN }}

- name: Log in to GitHub CR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Log in to the container registry
if: inputs.environment && vars.registry
uses: docker/login-action@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/python_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
runs-on: ${{ (contains(inputs.platform, 'arm') && 'linux-arm64-cpu8') || 'linux-amd64-cpu8' }}
permissions:
contents: read
packages: read

outputs:
artifact_name: ${{ steps.prereqs.outputs.artifact_name }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/test_in_devenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
runs-on: ${{ (contains(inputs.platform, 'arm') && 'linux-arm64-cpu8') || 'linux-amd64-cpu8' }}
permissions:
contents: read
packages: read

steps:
- name: Checkout repository
Expand All @@ -44,6 +45,14 @@ jobs:
key: ${{ inputs.devdeps_cache }}
fail-on-cache-miss: true

- name: Log in to GitHub CR
if: inputs.devdeps_image != ''
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Set up context for buildx
run: |
docker context create builder_context
Expand Down Expand Up @@ -152,6 +161,7 @@ jobs:
runs-on: ${{ (contains(inputs.platform, 'arm') && 'linux-arm64-cpu8') || 'linux-amd64-cpu8' }}
permissions:
contents: read
packages: read

steps:
- name: Checkout repository
Expand All @@ -166,6 +176,14 @@ jobs:
key: ${{ inputs.devdeps_cache }}
fail-on-cache-miss: true

- name: Log in to GitHub CR
if: inputs.devdeps_image != ''
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Set up context for buildx
run: |
docker context create builder_context
Expand Down

0 comments on commit e8a7812

Please sign in to comment.