Upload Alerts to AWS/Rockset #529
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
# upload alerts every 10 minutes | |
name: Upload Alerts to AWS/Rockset | |
on: | |
schedule: | |
- cron: '*/10 * * * *' | |
pull_request: | |
paths: | |
- 'tools/alerts/create_alerts.py' | |
- '.github/workflows/upload-alerts.yml' | |
jobs: | |
upload-alerts: | |
if: ${{ github.repository_owner == 'pytorch' }} | |
runs-on: [self-hosted, linux.2xlarge] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Install Python Packages | |
run: | | |
pip3 install rockset==1.0.3 | |
pip3 install boto3==1.19.12 | |
pip3 install requests==2.27.1 | |
- name: Create alerts | |
run: | | |
output=$(PYTHONPATH=$PYTHONPATH:$(pwd) python3 "tools/alerts/create_alerts.py") | |
echo "uploading following alerts" | |
echo "$output" | |
echo "script-output=$output" >> "$GITHUB_OUTPUT" | |
id: alert_creation_step | |
- name: Upload alerts | |
env: | |
ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
uses: pytorch/test-infra/.github/actions/upload-alerts@main | |
with: | |
alerts: '${{ steps.alert_creation_step.outputs.script-output }}' | |
organization: "pytorch" | |
repo: "pytorch" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} | |
cancel-in-progress: true |