Upload tutorials stat #620
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
# This is a basic workflow to help you get started with Actions | |
name: Upload tutorials stat | |
# Controls when the workflow will run | |
on: | |
schedule: | |
# Run this once per day. | |
- cron: "0 0 * * *" | |
# Allows you to run this workflow manually from the Actions tab | |
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@v3 | |
with: | |
repository: 'pytorch/tutorials' | |
path: './tutorials' | |
fetch-depth: 0 | |
- name: Checkout the test-infra repo | |
uses: actions/checkout@v3 | |
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 |