Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
run docker build push in parallel for 3 images
Browse files Browse the repository at this point in the history
  • Loading branch information
samos123 committed Aug 2, 2023
1 parent 9842f43 commit fa16074
Showing 1 changed file with 42 additions and 14 deletions.
56 changes: 42 additions & 14 deletions .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "v*.*.*"
pull_request:
jobs:
docker-pipeline:
controller:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -36,32 +36,60 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-controller-manager.outputs.tags }}
labels: ${{ steps.meta-controller-manager.outputs.labels }}
installer:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_TOKEN }}"
- name: Docker meta
id: meta-gcp-manager
id: meta-installer
uses: docker/metadata-action@v4
with:
images: substratusai/gcp-manager
images: substratusai/installer
- name: Build and push
id: build-and-push-gcp-manager
id: build-and-push-installer
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.gcpmanager
context: install/
platforms: "linux/amd64,linux/arm64"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-gcp-manager.outputs.tags }}
labels: ${{ steps.meta-gcp-manager.outputs.labels }}
tags: ${{ steps.meta-installer.outputs.tags }}
labels: ${{ steps.meta-installer.outputs.labels }}
gcp-manager:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_TOKEN }}"
- name: Docker meta
id: meta-installer
id: meta-gcp-manager
uses: docker/metadata-action@v4
with:
images: substratusai/installer
images: substratusai/gcp-manager
- name: Build and push
id: build-and-push-installer
id: build-and-push-gcp-manager
uses: docker/build-push-action@v4
with:
context: install/
context: .
file: Dockerfile.gcpmanager
platforms: "linux/amd64,linux/arm64"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-installer.outputs.tags }}
labels: ${{ steps.meta-installer.outputs.labels }}
tags: ${{ steps.meta-gcp-manager.outputs.tags }}
labels: ${{ steps.meta-gcp-manager.outputs.labels }}

0 comments on commit fa16074

Please sign in to comment.