-
Notifications
You must be signed in to change notification settings - Fork 88
48 lines (45 loc) · 1.6 KB
/
revert-tracker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: revert printer
on:
repository_dispatch:
schedule:
# At 15:10 (8:10 AM PST) on Monday
- cron: 10 15 * * 1
jobs:
revert_printer:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@v4
with:
path: test-infra
- name: checkout
uses: actions/checkout@v4
with:
repository: pytorch/pytorch
path: pytorch
fetch-depth: 0
- id: generate-reverts-file
run: |
cd test-infra/tools
python3 -m pip install clickhouse-connect==0.8.14
python3 -m torchci.reverts
echo "revert_file=$(cat revert_file_name.txt)" >> "${GITHUB_OUTPUT}"
env:
CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }}
CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }}
CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }}
- name: Push file to this repository
if: steps.generate-reverts-file.outputs.revert_file != 'None'
uses: dmnemec/copy_file_to_another_repo_action@5f40763ccee2954067adba7fb8326e4df33bcb92
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
with:
source_file: test-infra/tools/${{ steps.generate-reverts-file.outputs.revert_file }}
destination_repo: "pytorch/test-infra"
destination_folder: "reverts"
destination_branch: generated-stats
user_email: "[email protected]"
user_name: "PyTorch Test Infra"
commit_message: "Updating helper for reverts"