github.com/kubeflow/training-operator@v1.7.0/.github/workflows/template-publish-image/action.yaml (about) 1 # Composite action to publish Training Operator images. 2 name: Build And Publish Container Images 3 description: Build Multiplatform Supporting Container Images 4 5 inputs: 6 image: 7 required: true 8 description: image tag 9 dockerfile: 10 required: true 11 description: path for Dockerfile 12 platforms: 13 required: true 14 description: e.g, linux/amd64 15 push: 16 required: true 17 description: whether to push container images or not 18 19 runs: 20 using: composite 21 steps: 22 - name: Setup QEMU 23 uses: docker/setup-qemu-action@v2 24 with: 25 platforms: amd64,ppc64le,arm64 26 27 - name: Set Up Docker Buildx 28 uses: docker/setup-buildx-action@v2 29 30 - name: Add Docker Tags 31 id: meta 32 uses: docker/metadata-action@v4 33 with: 34 images: ${{ inputs.image }} 35 tags: | 36 type=raw,latest 37 type=sha,prefix=v1- 38 39 - name: Build and Push 40 uses: docker/build-push-action@v3 41 with: 42 platforms: ${{ inputs.platforms }} 43 context: . 44 file: ${{ inputs.dockerfile }} 45 push: ${{ inputs.push }} 46 tags: ${{ steps.meta.outputs.tags }} 47 cache-from: type=gha 48 cache-to: type=gha,mode=max