Merge pull request #5945 from dokku/faster-ci

tests: split out image building into it's own job to speed up ci
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2023-06-17 01:58:00 -04:00
commit 8569395cae
2 files changed
+39 -1

No files matched your search

+38
View File
@@ -61,6 +61,8 @@ jobs:
- name: build package - name: build package
run: ./tests/ci/setup.sh build run: ./tests/ci/setup.sh build
env:
SKIP_IMAGE_BUILD: true
- name: set matrix for build - name: set matrix for build
id: set-matrix id: set-matrix
@@ -75,6 +77,42 @@ jobs:
name: build name: build
path: build path: build
build-image:
name: build-image.${{ matrix.architecture }}
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
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
run: |
docker buildx build \
--platform ${{ matrix.architecture }} \
--progress plain \
--tag "dokku/dokku:latest" \
.
unit-tests: unit-tests:
name: unit.${{ matrix.index }} name: unit.${{ matrix.index }}
needs: build needs: build
+1 -1
View File
@@ -391,7 +391,7 @@ fn-build-docker-image() {
--push \ --push \
--tag "dokku/dokku:latest" \ --tag "dokku/dokku:latest" \
--tag "dokku/dokku:$VERSION" . --tag "dokku/dokku:$VERSION" .
else elif [[ "$SKIP_IMAGE_BUILD" != "true" ]]; then
docker buildx build \ docker buildx build \
--platform linux/arm,linux/arm64,linux/amd64 \ --platform linux/arm,linux/arm64,linux/amd64 \
--progress plain \ --progress plain \