Skip to content

Upload tutorials stat #296

Upload tutorials stat

Upload tutorials stat #296

# This is a basic workflow to help you get started with Actions
name: Upload tutorials stat
# Controls when the workflow will run
on:
pull_request:
paths:
- .github/workflows/upload-tutorials-stats.yml
- .github/scripts/get_tutorials_stats.py
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
steps:
- 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 typing==3.7.4.3
- name: Run the script
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.TORCHCI_TUTORIAL_DYNAMODB_READ_WRITE_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TORCHCI_TUTORIAL_DYNAMODB_READ_WRITE_AWS_SECRET_ACCESS_KEY }}
run: |
set -x
python3 test-infra/.github/scripts/get_tutorials_stats.py