From 6efa49f4fcd949efb32b94c0f94a39e824248aa4 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Fri, 16 Jun 2023 18:13:36 +0200 Subject: [PATCH] run build in separate jobs and push --- .github/workflows/docker.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index afe8549..292591b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,14 +10,10 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - build: + build-debian: runs-on: ubuntu-latest - # strategy: - # matrix: - # variant: ['', 'alpine'] - steps: - name: Checkout repo @@ -54,10 +50,35 @@ jobs: name: Build and publish ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - Debian uses: docker/build-push-action@v4 with: - push: false + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 + + build-aline: + + runs-on: ubuntu-latest + + steps: + - + name: Checkout repo + uses: actions/checkout@v3 + - + name: Log in to the Github Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Extract metadata (tags, labels) for docker image - Alpine id: meta-alpine @@ -75,7 +96,7 @@ jobs: name: Build and publish ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - Alpine uses: docker/build-push-action@v4 with: - push: false + push: true tags: ${{ steps.meta-alpine.outputs.tags }} labels: ${{ steps.meta-alpine.outputs.labels }} platforms: linux/amd64,linux/arm64