improve #75
Workflow file for this run
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: diffusers-docker-cd | |
on: | |
push: | |
branches: | |
- test-raph | |
paths: | |
- ".github/workflows/python-api-diffusers-cd.yaml" | |
- "docker_images/diffusers/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.7 | |
- name: Inject slug/short variables | |
uses: rlespinasse/github-slug-action@v4.5.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.6.1 | |
- name: downcase REPO | |
run: | | |
echo "CONTAINER_REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5.5.1 | |
with: | |
images: ghcr.io/${{ env.CONTAINER_REPO }} | |
# Is this step useful ? Do we really support multi arch / cross compiling ? | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3.2.0 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Set up Python ${{ matrix.python-version }} | |
# uses: actions/setup-python@v5.1.1 | |
# with: | |
# python-version: "3.8" | |
# - name: Install dependencies | |
# run: | | |
# pip install --upgrade pip | |
- name: Build and push Docker image | |
id: build-and-push | |
uses: docker/build-push-action@v6.5.0 | |
with: | |
context: docker_images/diffusers | |
push: false | |
platforms: 'linux/amd64' | |
tags: ghcr.io/${{ env.CONTAINER_REPO }}/diffusers-${{ env.GITHUB_SHA_SHORT || steps.meta-pr.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels || steps.meta-pr.outputs.labels }} | |
# TODO: cache-from/cache-to |