Skip to content

Commit

Permalink
run build in separate jobs and push
Browse files Browse the repository at this point in the history
  • Loading branch information
BWibo committed Jun 16, 2023
1 parent c0a94b0 commit 6efa49f
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6efa49f

Please sign in to comment.