diff --git a/.github/workflows/update_metadata.yml b/.github/workflows/update_metadata.yml index e5c443d61ae6..bae572b41b4b 100644 --- a/.github/workflows/update_metadata.yml +++ b/.github/workflows/update_metadata.yml @@ -14,6 +14,7 @@ jobs: update_metadata: permissions: contents: read + id-token: write # needed for the HF Trusted Publisher token exchange runs-on: ubuntu-22.04 defaults: run: @@ -30,11 +31,12 @@ jobs: - name: Setup environment run: | pip install --upgrade pip - pip install datasets pandas + pip install datasets pandas "huggingface_hub>=1.19.0" pip install .[torch] - name: Update metadata env: - HF_TOKEN: ${{ secrets.SAYAK_HF_TOKEN }} + # Short-lived token (1h) from the Hub's Trusted Publishers, scoped to this dataset only + HF_OIDC_RESOURCE: datasets/huggingface/diffusers-metadata run: | python utils/update_metadata.py --commit_sha ${{ github.sha }}