54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: Build pr ci-docker
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- change-ci # 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, '[push-ci-image]') && '!cancelled()' }}
|
|
|
|
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 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: true
|
|
tags: huggingface/transformers-${{ matrix.file }} |