Skip to content

Update S3 HTML indices for download.pytorch.org #28010

Update S3 HTML indices for download.pytorch.org

Update S3 HTML indices for download.pytorch.org #28010

name: Update S3 HTML indices for download.pytorch.org
on:
schedule:
# Update the indices every hour
- cron: "0 * * * *"
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
update:
runs-on: ubuntu-22.04
environment: pytorchbot-env
strategy:
matrix:
prefix: ["whl", "whl/test", "whl/nightly", "libtorch", "libtorch/nightly", "whl/preview/forge", "source_code/test"]
fail-fast: False
container:
image: continuumio/miniconda3:23.10.0-1
steps:
- name: configure aws credentials
id: aws_creds
uses: aws-actions/configure-aws-credentials@50ac8dd1e1b10d09dac7b8727528b91bed831ac0 # v3.0.2
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_s3_update
aws-region: us-east-1
- name: Checkout repository test-infra
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: pytorch/test-infra
ref: ${{ github.ref }}
- name: Update s3 html index
shell: bash
env:
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
run: |
set -ex
# Output info on default conda env
conda info
# Install requirements
pip install -r s3_management/requirements.txt
# Run index update workflow
python s3_management/manage_v2.py ${{ matrix.prefix }}