File tree Expand file tree Collapse file tree 4 files changed +99
-91
lines changed
actions/update-commit-hash Expand file tree Collapse file tree 4 files changed +99
-91
lines changed Original file line number Diff line number Diff line change 1+ name : Update commit hash
2+
3+ inputs :
4+ repo-owner :
5+ required : false
6+ type : string
7+ description : Name of repository's owner.
8+ default : pytorch
9+ repo-name :
10+ required : true
11+ type : string
12+ description : Name of the repository we're updating commit hash for.
13+ branch :
14+ required : true
15+ type : string
16+ description : Branch to fetch commit of
17+ pin-folder :
18+ type : string
19+ description : Path to folder with commit pin
20+ required : false
21+ default : .github/ci_commit_pins
22+ updatebot-token :
23+ required : true
24+ type : string
25+ description : update bot token
26+ pytorchbot-token :
27+ required : true
28+ type : string
29+ description : update bot token
30+
31+ description : update commit hash
32+
33+ runs :
34+ using : composite
35+ steps :
36+ - name : Checkout repo
37+ uses : actions/checkout@v3
38+ with :
39+ fetch-depth : 1
40+ submodules : false
41+ token : ${{ inputs.updatebot-token }}
42+ - name : Checkout
43+ shell : bash
44+ run : |
45+ git clone https://github.com/${{ inputs.repo-owner }}/${{ inputs.repo-name }}.git --quiet
46+ - name : Check if there already exists a PR
47+ shell : bash
48+ env :
49+ REPO_NAME : ${{ inputs.repo-name }}
50+ BRANCH : ${{ inputs.branch }}
51+ PIN_FOLDER : ${{ inputs.pin-folder }}
52+ UPDATEBOT_TOKEN : ${{ inputs.updatebot-token }}
53+ PYTORCHBOT_TOKEN : ${{ inputs.pytorchbot-token }}
54+ NEW_BRANCH_NAME : update-${{ inputs.repo-name }}-commit-hash/${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
55+ run : |
56+ # put this here instead of the script to prevent accidentally changing the config when running the script locally
57+ git config --global user.name "PyTorch UpdateBot"
58+ git config --global user.email "[email protected] " 59+ python .github/scripts/update_commit_hashes.py --repo-name "${REPO_NAME}" --branch "${BRANCH}" --pin-folder "${PIN_FOLDER}"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -37,11 +37,18 @@ jobs:
3737 GH_PYTORCHBOT_TOKEN : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
3838
3939 update-vision-commit-hash :
40- uses : ./.github/workflows/_update-commit-hash.yml
41- if : ${{ github.event_name == 'schedule' }}
42- with :
43- repo-name : vision
44- branch : main
45- secrets :
46- UPDATEBOT_TOKEN : ${{ secrets.UPDATEBOT_TOKEN }}
47- PYTORCHBOT_TOKEN : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
40+ runs-on : ubuntu-latest
41+ environment : update-commit-hash
42+ steps :
43+ - name : Checkout repo
44+ uses : actions/checkout@v3
45+ with :
46+ fetch-depth : 0
47+ - name : update-vision-commit-hash
48+ uses : ./.github/actions/update-commit-hash
49+ if : ${{ github.event_name == 'schedule' }}
50+ with :
51+ repo-name : vision
52+ branch : main
53+ updatebot-token : ${{ secrets.UPDATEBOT_TOKEN }}
54+ pytorchbot-token : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
Original file line number Diff line number Diff line change 99 workflow_dispatch :
1010
1111jobs :
12- update-xla-commit-hash :
13- uses : ./.github/workflows/_update-commit-hash.yml
14- with :
15- repo-name : xla
16- branch : master
17- secrets :
18- UPDATEBOT_TOKEN : ${{ secrets.UPDATEBOT_TOKEN }}
19- PYTORCHBOT_TOKEN : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
20-
21- update-triton-commit-hash :
22- uses : ./.github/workflows/_update-commit-hash.yml
23- with :
24- repo-owner : openai
25- repo-name : triton
26- branch : main
27- pin-folder : .ci/docker/ci_commit_pins
28- secrets :
29- UPDATEBOT_TOKEN : ${{ secrets.UPDATEBOT_TOKEN }}
30- PYTORCHBOT_TOKEN : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
12+ update-commit-hash :
13+ runs-on : ubuntu-latest
14+ environment : update-commit-hash
15+ steps :
16+ - name : Checkout repo
17+ uses : actions/checkout@v3
18+ with :
19+ fetch-depth : 0
20+ - name : update-xla-commit-hash
21+ continue-on-error : true
22+ uses : ./.github/actions/update-commit-hash
23+ with :
24+ repo-name : xla
25+ branch : master
26+ updatebot-token : ${{ secrets.UPDATEBOT_TOKEN }}
27+ pytorchbot-token : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
28+ - name : update-triton-commit-hash
29+ uses : ./.github/actions/update-commit-hash
30+ with :
31+ repo-owner : openai
32+ repo-name : triton
33+ branch : main
34+ pin-folder : .ci/docker/ci_commit_pins
35+ updatebot-token : ${{ secrets.UPDATEBOT_TOKEN }}
36+ pytorchbot-token : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
You can’t perform that action at this time.
0 commit comments