mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-03 12:50:06 +06:00
Allow CI could be run on private forked repositories (e.g. new model additions) (#33594)
fix Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
6dc364616d
commit
31650a53a1
@ -47,13 +47,13 @@ jobs:
|
|||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: "Retrieve Artifact Paths"
|
name: "Retrieve Artifact Paths"
|
||||||
env:
|
# [reference] https://circleci.com/docs/api/v2/index.html#operation/getJobArtifacts
|
||||||
CIRCLE_TOKEN: ${{ secrets.CI_ARTIFACT_TOKEN }}
|
# `CIRCLE_TOKEN` is defined as an environment variables set within a context, see `https://circleci.com/docs/contexts/`
|
||||||
command: |
|
command: |
|
||||||
project_slug="gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
|
project_slug="gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
|
||||||
job_number=${CIRCLE_BUILD_NUM}
|
job_number=${CIRCLE_BUILD_NUM}
|
||||||
url="https://circleci.com/api/v2/project/${project_slug}/${job_number}/artifacts"
|
url="https://circleci.com/api/v2/project/${project_slug}/${job_number}/artifacts"
|
||||||
curl -o test_preparation/artifacts.json ${url}
|
curl -o test_preparation/artifacts.json ${url} --header "Circle-Token: $CIRCLE_TOKEN"
|
||||||
- run:
|
- run:
|
||||||
name: "Prepare pipeline parameters"
|
name: "Prepare pipeline parameters"
|
||||||
command: |
|
command: |
|
||||||
@ -190,7 +190,10 @@ workflows:
|
|||||||
- check_circleci_user
|
- check_circleci_user
|
||||||
- check_code_quality
|
- check_code_quality
|
||||||
- check_repository_consistency
|
- check_repository_consistency
|
||||||
- fetch_tests
|
- fetch_tests:
|
||||||
|
# [reference] https://circleci.com/docs/contexts/
|
||||||
|
context:
|
||||||
|
- TRANSFORMERS_CONTEXT
|
||||||
|
|
||||||
nightly:
|
nightly:
|
||||||
when: <<pipeline.parameters.nightly>>
|
when: <<pipeline.parameters.nightly>>
|
||||||
|
Loading…
Reference in New Issue
Block a user