revert printer #167
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
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" |