No name [push-ci-image] #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build docker | |
on: | |
push: | |
branches: | |
- change-ci | |
repository_dispatch: | |
workflow_call: | |
inputs: | |
image_postfix: | |
required: true | |
type: string | |
schedule: | |
- cron: "17 0 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
quality: | |
# Push CI doesn't need this image | |
# if: inputs.image_postfix != '-push-ci' | |
strategy: | |
matrix: | |
file: ["quality", "consistency", "custom-tokenizers", "torch-light", "tf-light", "exotic-models"] # Add your file names here | |
runs-on: ubuntu-22.04 | |
if: | | |
contains(github.event.head_commit.message, '[push-ci-image]') && contains(github.actor, 'transformers') && ${{ !cancelled() && (success() || failure()) }} | |
steps: | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Check out code | |
uses: actions/checkout@v3 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- | |
name: ${{ matrix.file }} | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./docker | |
build-args: | | |
REF=main | |
file: "./docker/${{ matrix.file }}.dockerfile" | |
push: true | |
tags: huggingface/transformers-${{ matrix.file }} |