mirror of
https://github.com/huggingface/diffusers.git
synced 2026-10-23 09:09:01 +03:00
Use HF Trusted Publisher token in update_metadata workflow (#15096)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
6
.github/workflows/update_metadata.yml
vendored
6
.github/workflows/update_metadata.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user