Upload tutorials stat #781
This file contains hidden or 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: Upload tutorials stat | |
on: | |
schedule: | |
# Run this once per day. | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
get-tutorials-stats: | |
if: ${{ github.repository == 'pytorch/test-infra' }} | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Configure aws credentials | |
id: aws_creds | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_upload-tutorials-stats | |
aws-region: us-east-1 | |
- name: Checkout the tutorials repo | |
uses: actions/checkout@v4 | |
with: | |
repository: 'pytorch/tutorials' | |
path: './tutorials' | |
fetch-depth: 0 | |
- name: Checkout the pytorch repo | |
uses: actions/checkout@v4 | |
with: | |
path: './pytorch' | |
fetch-depth: 0 | |
- name: Checkout the test-infra repo | |
uses: actions/checkout@v4 | |
with: | |
path: test-infra | |
- name: Install dependencies | |
run: | | |
python3 -m pip install boto3==1.26.69 | |
- name: Run the script | |
run: | | |
set -x | |
python3 test-infra/.github/scripts/get_tutorials_stats.py |