Skip to content

[build-ci-image]

[build-ci-image] #258

name: Build pr ci-docker
on:
push:
branches:
- push-ci-image # for now let's only build on this branch
repository_dispatch:
workflow_call:
inputs:
image_postfix:
required: true
type: string
schedule:
- cron: "6 0 * * *"
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
if: ${{ contains(github.event.head_commit.message, '[build-ci-image]') || contains(github.event.head_commit.message, '[push-ci-image]') && '!cancelled()' || github.event_name == 'schedule' }}
strategy:
matrix:
file: ["quality", "consistency", "custom-tokenizers", "torch-light", "tf-light", "exotic-models", "torch-tf-light", "torch-jax-light", "jax-light", "examples-torch", "examples-tf"]
continue-on-error: true
steps:
-
name: Set tag
run: |
if [contains(github.event.head_commit.message, '[build-ci-image]')]; then
echo "huggingface/transformers-${{ matrix.file }}:dev" >> "$GITHUB_ENV"
else
echo "huggingface/transformers-${{ matrix.file }}" >> "$GITHUB_ENV"
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Check out code
uses: actions/checkout@v4
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Build ${{ matrix.file }}.dockerfile
uses: docker/build-push-action@v5
with:
context: ./docker
build-args: |
REF=${{ github.sha }}
file: "./docker/${{ matrix.file }}.dockerfile"
push: ${{ contains(github.event.head_commit.message, '[push-ci-image]') || github.event_name == 'schedule' }}
tags: ${{ GITHUB_ENV }}

Check failure on line 62 in .github/workflows/build-ci-docker-images.yml

View workflow run for this annotation

GitHub Actions / Build pr ci-docker

Invalid workflow file

The workflow is not valid. .github/workflows/build-ci-docker-images.yml (Line: 62, Col: 17): Unrecognized named-value: 'GITHUB_ENV'. Located at position 1 within expression: GITHUB_ENV