refactor: split out image building job matrix into separate jobs
This will allow using a different runner for each.
This commit is contained in:
1 parent
d867a4d77e
commit
7a857ad628
2 files changed
+61
-28
No files matched your search
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
name: 'build-image'
|
||||||
|
|
||||||
|
description: 'builds a dokku docker image'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
architecturet:
|
||||||
|
description: 'platform to build'
|
||||||
|
required: true
|
||||||
|
default: 'linux/amd64'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: download packages
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: build
|
||||||
|
|
||||||
|
- name: set up qemu
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: set up docker buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: build docker image
|
||||||
|
timeout-minutes: 20
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform ${{ inputs.architecturet }} \
|
||||||
|
--progress plain \
|
||||||
|
--tag "dokku/dokku:latest" \
|
||||||
|
.
|
||||||
+24
-28
@@ -80,42 +80,38 @@ jobs:
|
|||||||
name: build
|
name: build
|
||||||
path: build
|
path: build
|
||||||
|
|
||||||
build-image:
|
build-image-amd64:
|
||||||
name: build-image.${{ matrix.architecture }}
|
name: build-image.linux/amd64
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
architecture:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm
|
|
||||||
- linux/arm64
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: build-image
|
||||||
|
uses: ./.github/actions/build-image
|
||||||
- name: download packages
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: build
|
architecture: linux/amd64
|
||||||
path: build
|
|
||||||
|
|
||||||
- name: set up qemu
|
build-image-arm:
|
||||||
uses: docker/setup-qemu-action@v2
|
name: build-image.linux/arm
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
- name: set up docker buildx
|
steps:
|
||||||
id: buildx
|
- name: build-image
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: ./.github/actions/build-image
|
||||||
|
with:
|
||||||
|
architecture: linux/arm
|
||||||
|
|
||||||
- name: build docker image
|
build-image-arm64:
|
||||||
timeout-minutes: 20
|
name: build-image.linux/arm64
|
||||||
run: |
|
needs: build
|
||||||
docker buildx build \
|
runs-on: ubuntu-20.04
|
||||||
--platform ${{ matrix.architecture }} \
|
|
||||||
--progress plain \
|
steps:
|
||||||
--tag "dokku/dokku:latest" \
|
- name: build-image
|
||||||
.
|
uses: ./.github/actions/build-image
|
||||||
|
with:
|
||||||
|
architecture: linux/arm64
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
name: unit.${{ matrix.index }}
|
name: unit.${{ matrix.index }}
|
||||||
|
|||||||
Reference in new issue
Block a user