Use docker-build env to access GHCR_PAT (#107655)

This will restrict the access to GHCR_PAT to only [docker-build](https://github.com/pytorch/pytorch/settings/environments/1258682414/edit) env.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107655
Approved by: https://github.com/clee2000, https://github.com/atalman
This commit is contained in:
Huy Do
2023-08-23 23:45:39 +00:00
committed by PyTorch MergeBot
parent b74b8e33db
commit 9a365fe914
2 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ env:
jobs:
docker-build:
runs-on: [self-hosted, linux.2xlarge]
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) && 'docker-build' || '' }}
timeout-minutes: 240
strategy:
fail-fast: false

View File

@ -32,6 +32,7 @@ jobs:
build:
if: ${{ github.repository == 'pytorch/pytorch' }}
runs-on: [self-hosted, linux.2xlarge]
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) && 'docker-build' || '' }}
timeout-minutes: 240
strategy:
matrix: