Skip to content

fix(ci): switch gpu-tests to pull_request_target to prevent approval … #35

fix(ci): switch gpu-tests to pull_request_target to prevent approval …

fix(ci): switch gpu-tests to pull_request_target to prevent approval … #35

Workflow file for this run

name: Build and Push Docker Images
# CI builds pull all model checkpoints (~10 GB) from Docker Hub automatically via:
# COPY --from=diffuseproject/sampleworks-checkpoints:latest /checkpoints/ /checkpoints/
# No checkpoint files are needed on the CI runner. The checkpoints base image is
# pre-built and pushed from the GPU server. See Dockerfile comments for details.
on:
push:
branches: [main]
tags:
- 'v*.*.*'
workflow_dispatch:
env:
DOCKERHUB_ORG: diffuseproject
IMAGE_NAME: sampleworks
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# The Dockerfile uses COPY --from=diffuseproject/sampleworks-checkpoints:latest
# which Docker automatically pulls from Docker Hub during the build.
# No checkpoint files are needed in the CI build context.
- name: Docker metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.DOCKERHUB_ORG }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=sha,prefix=
type=semver,pattern={{version}}
type=semver,pattern=v{{version}}
- name: Build and push Docker image
id: build-push
uses: docker/build-push-action@v7
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
- name: Image digest
run: echo "Image pushed with digest ${{ steps.build-push.outputs.digest }}"