diff --git a/.github/workflows/build_portable_linux_pytorch_wheels.yml b/.github/workflows/build_portable_linux_pytorch_wheels.yml index 355e32c8465..2b29a81c45f 100644 --- a/.github/workflows/build_portable_linux_pytorch_wheels.yml +++ b/.github/workflows/build_portable_linux_pytorch_wheels.yml @@ -40,6 +40,12 @@ on: description: Patch directory name from where to apply existing patches. required: true type: string + repository: + description: "Repository to checkout. Otherwise, defaults to `github.repository`." + type: string + ref: + description: "Branch, tag or SHA to checkout. Defaults to the reference or SHA that triggered the workflow." + type: string workflow_dispatch: inputs: amdgpu_family: @@ -113,6 +119,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} - name: Configure Git Identity run: | @@ -208,6 +217,9 @@ jobs: steps: - name: Checking out repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} - name: Generating target to run id: configure @@ -228,6 +240,8 @@ jobs: python_version: ${{ inputs.python_version }} torch_version: ${{ needs.build_pytorch_wheels.outputs.torch_version }} pytorch_version: ${{ inputs.pytorch_version }} + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} upload_pytorch_wheels: name: Release PyTorch Wheels to S3 @@ -245,6 +259,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} - name: Configure AWS Credentials if: always() diff --git a/.github/workflows/release_portable_linux_packages.yml b/.github/workflows/release_portable_linux_packages.yml index c7ae634441c..8a7ebb39b40 100644 --- a/.github/workflows/release_portable_linux_packages.yml +++ b/.github/workflows/release_portable_linux_packages.yml @@ -18,6 +18,12 @@ on: description: "Staging subdirectory to push the packages" type: string default: "v2-staging" + repository: + description: "Repository to checkout. Otherwise, defaults to `github.repository`." + type: string + ref: + description: "Branch, tag or SHA to checkout. Defaults to the reference or SHA that triggered the workflow." + type: string # Trigger manually (typically to test the workflow or manually build a release [candidate]) workflow_dispatch: inputs: @@ -63,6 +69,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} + - name: Setup Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: @@ -125,9 +135,14 @@ jobs: steps: - name: "Checking out repository" uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: '3.10' + # TODO: We shouldn't be using a cache on actual release branches, but it # really helps for iteration time. - name: Enable cache @@ -245,7 +260,8 @@ jobs: "s3_staging_subdir": "${{ env.S3_STAGING_SUBDIR }}", "cloudfront_url": "${{ needs.setup_metadata.outputs.cloudfront_url }}", "cloudfront_staging_url": "${{ needs.setup_metadata.outputs.cloudfront_staging_url }}", - "rocm_version": "${{ needs.setup_metadata.outputs.version }}" + "rocm_version": "${{ needs.setup_metadata.outputs.version }}", + "ref": "${{ inputs.ref || '' }}" } - name: Save cache diff --git a/.github/workflows/release_portable_linux_pytorch_wheels.yml b/.github/workflows/release_portable_linux_pytorch_wheels.yml index 41c5362c587..6f42959dc57 100644 --- a/.github/workflows/release_portable_linux_pytorch_wheels.yml +++ b/.github/workflows/release_portable_linux_pytorch_wheels.yml @@ -29,6 +29,9 @@ on: rocm_version: description: ROCm version to pip install type: string + ref: + description: "Branch, tag or SHA to checkout. Defaults to the reference or SHA that triggered the workflow." + type: string workflow_dispatch: inputs: amdgpu_family: @@ -63,6 +66,10 @@ on: rocm_version: description: ROCm version to pip install type: string + ref: + description: "Branch, tag or SHA to checkout. Defaults to the reference or SHA that triggered the workflow." + type: string + default: '' permissions: @@ -95,3 +102,4 @@ jobs: rocm_version: ${{ inputs.rocm_version }} pytorch_version: ${{ matrix.pytorch_version }} pytorch_patchset: ${{ matrix.pytorch_patchset }} + ref: ${{ inputs.ref || '' }} diff --git a/.github/workflows/test_pytorch_wheels.yml b/.github/workflows/test_pytorch_wheels.yml index a0a35ffd3e8..fc5509db646 100644 --- a/.github/workflows/test_pytorch_wheels.yml +++ b/.github/workflows/test_pytorch_wheels.yml @@ -49,6 +49,12 @@ on: description: PyTorch version to checkout. ("nightly", or "release/2.7") type: string default: "release/2.7" + repository: + description: "Repository to checkout. Otherwise, defaults to `github.repository`." + type: string + ref: + description: "Branch, tag or SHA to checkout. Defaults to the reference or SHA that triggered the workflow." + type: string permissions: contents: read @@ -75,6 +81,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + repository: ${{ inputs.repository || github.repository }} + ref: ${{ inputs.ref || '' }} - name: Set up Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0