Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed May 21, 2024
1 parent 744230a commit d280647
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
11 changes: 5 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
workflows: [" Build pr ci-docker"]
types:
- completed
- skipped

jobs:
# Ensure running with CircleCI/huggingface
Expand All @@ -33,11 +32,11 @@ jobs:
fetch_tests:
working_directory: ~/transformers
docker:
- image: |
if [contains(github.event.head_commit.message, '[build-ci-image]')]; then
huggingface/transformers-quality:dev
else
huggingface/transformers-quality
- image: huggingface/transformers-quality

environment:
GIT_COMMIT_MESSAGE: << pipeline.trigger_parameters.gitlab.repo_name >>

parallelism: 1
steps:
- checkout
Expand Down
4 changes: 4 additions & 0 deletions .circleci/create_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def __post_init__(self):
if self.docker_image is None:
# Let's avoid changing the default list and make a copy.
self.docker_image = copy.deepcopy(DEFAULT_DOCKER_IMAGE)
else:
# BIG HACK WILL REMOVE ONCE FETCHER IS UPDATED
if "[build-ci-image]" in os.environ.get("GIT_COMMIT_MESSAGE", ""):
self.docker_image += ":dev"
if self.install_steps is None:
self.install_steps = []
if self.pytest_options is None:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/build-ci-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ jobs:
continue-on-error: true

steps:
-
name: Set tag
run: |
if [contains(github.event.head_commit.message, '[build-ci-image]')]; then
echo "huggingface/transformers-quality:dev" >> "$GITHUB_ENV"
else
echo "huggingface/transformers-quality" >> "$GITHUB_ENV"
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -51,8 +59,4 @@ jobs:
REF=${{ github.sha }}
file: "./docker/${{ matrix.file }}.dockerfile"
push: ${{ contains(github.event.head_commit.message, '[push-ci-image]') || github.event_name == 'schedule' }}
tags: |
if [contains(github.event.head_commit.message, '[build-ci-image]')]; then
huggingface/transformers-quality:dev
else
huggingface/transformers-quality
tags: ${{ GITHUB_ENV }}

0 comments on commit d280647

Please sign in to comment.