refactor: split out image building job matrix into separate jobs
This will allow using a different runner for each.
This commit is contained in:
37
.github/actions/build-image/action.yml
vendored
Normal file
37
.github/actions/build-image/action.yml
vendored
Normal file
@@ -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" \
|
||||
.
|
||||
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@@ -80,42 +80,38 @@ jobs:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
build-image:
|
||||
name: build-image.${{ matrix.architecture }}
|
||||
build-image-amd64:
|
||||
name: build-image.linux/amd64
|
||||
needs: build
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
architecture:
|
||||
- linux/amd64
|
||||
- linux/arm
|
||||
- linux/arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v3
|
||||
- name: build-image
|
||||
uses: ./.github/actions/build-image
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
architecture: linux/amd64
|
||||
|
||||
- name: set up qemu
|
||||
uses: docker/setup-qemu-action@v2
|
||||
build-image-arm:
|
||||
name: build-image.linux/arm
|
||||
needs: build
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
- name: set up docker buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
steps:
|
||||
- name: build-image
|
||||
uses: ./.github/actions/build-image
|
||||
with:
|
||||
architecture: linux/arm
|
||||
|
||||
- name: build docker image
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform ${{ matrix.architecture }} \
|
||||
--progress plain \
|
||||
--tag "dokku/dokku:latest" \
|
||||
.
|
||||
build-image-arm64:
|
||||
name: build-image.linux/arm64
|
||||
needs: build
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: build-image
|
||||
uses: ./.github/actions/build-image
|
||||
with:
|
||||
architecture: linux/arm64
|
||||
|
||||
unit-tests:
|
||||
name: unit.${{ matrix.index }}
|
||||
|
||||
Reference in New Issue
Block a user