forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up automated hash pinning for triton (pytorch#97568)
Fixes #ISSUE_NUMBER Pull Request resolved: pytorch#97568 Approved by: https://github.com/huydhn, https://github.com/malfet
- Loading branch information
1 parent
f959a0d
commit a6155f3
Showing
4 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,24 @@ name: update-commit-hash | |
on: | ||
workflow_call: | ||
inputs: | ||
repo-owner: | ||
required: false | ||
type: string | ||
description: Name of repository's owner. | ||
default: pytorch | ||
repo-name: | ||
required: true | ||
type: string | ||
description: Name of the repository we're updating commit hash for. Must be in pytorch org. | ||
description: Name of the repository we're updating commit hash for. | ||
branch: | ||
required: true | ||
type: string | ||
description: Branch to fetch commit of | ||
pin-folder: | ||
type: string | ||
description: Path to folder with commit pin | ||
required: false | ||
default: .github/ci_commit_pins | ||
secrets: | ||
MERGEBOT_TOKEN: | ||
required: true | ||
|
@@ -23,7 +33,7 @@ env: | |
NEW_BRANCH_NAME: update-${{ inputs.repo-name }}-commit-hash/${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} | ||
|
||
jobs: | ||
update-xla-commit-hash: | ||
update-commit-hash: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
|
@@ -36,18 +46,19 @@ jobs: | |
- name: Checkout | ||
shell: bash | ||
run: | | ||
git clone https://github.com/pytorch/${{ inputs.repo-name }}.git --quiet | ||
git clone https://github.com/${{ inputs.repo-owner }}/${{ inputs.repo-name }}.git --quiet | ||
- name: Check if there already exists a PR | ||
shell: bash | ||
env: | ||
REPO_NAME: ${{ inputs.repo-name }} | ||
BRANCH: ${{ inputs.branch }} | ||
PIN_FOLDER: ${{ inputs.pin-folder }} | ||
MERGEBOT_TOKEN: ${{ secrets.MERGEBOT_TOKEN }} | ||
PYTORCHBOT_TOKEN: ${{ secrets.PYTORCHBOT_TOKEN }} | ||
run: | | ||
# put this here instead of the script to prevent accidentally changing the config when running the script locally | ||
git config --global user.name "PyTorch MergeBot" | ||
git config --global user.email "[email protected]" | ||
python .github/scripts/update_commit_hashes.py --repo-name "${REPO_NAME}" --branch "${BRANCH}" | ||
python .github/scripts/update_commit_hashes.py --repo-name "${REPO_NAME}" --branch "${BRANCH}" --pin-folder "${PIN_FOLDER}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters