Upload tutorials stat #49
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@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 | |
| 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: 'pytorch/tutorials' | |
| path: './tutorials' | |
| fetch-depth: 0 | |
| - name: Checkout the pytorch repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: 'pytorch/pytorch' | |
| path: './pytorch' | |
| fetch-depth: 0 | |
| - name: Checkout the test-infra repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| 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 |