diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 2ff0fc6..956af78 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -17,6 +17,7 @@ jobs: secrets: inherit strategy: fail-fast: false + max-parallel: 4 matrix: runner-name: [ actions-runner, @@ -54,6 +55,7 @@ jobs: needs: [create-runners, build-setup] strategy: fail-fast: false + max-parallel: 4 matrix: container: [ actions-runner, diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 8fbb3be..73bb549 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -12,6 +12,7 @@ jobs: secrets: inherit strategy: fail-fast: false + max-parallel: 4 matrix: runner-name: [ actions-runner, @@ -27,7 +28,7 @@ jobs: speedtest, stun, telegraf, - # verlihub, + verlihub, vyos-release-alert, xteve, yancobat @@ -49,6 +50,7 @@ jobs: needs: [create-runners, build-setup] strategy: fail-fast: false + max-parallel: 2 matrix: container: [ actions-runner, @@ -58,13 +60,12 @@ jobs: growatt-ev, iperf2, iperf3, - irrd, mdns-reflector, rng-tools, speedtest, stun, telegraf, - # verlihub, + verlihub, vyos-release-alert, xteve, yancobat @@ -101,5 +102,64 @@ jobs: # Test the built image - name: Test image run: | - set -ex - timeout --kill-after=30s --preserve-status 30s docker container run --rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test + set -x + timeout --kill-after=30s --preserve-status 30s \ + docker container run --attach stdout --attach stderr --init --rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test + # Remove the test image + - name: Remove test image + if: ${{ !cancelled() }} + run: | + set -x + docker image rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test + build-test-noinit: + name: Build and test image without `--init` + runs-on: self-hosted + needs: [create-runners, build-setup] + strategy: + fail-fast: false + max-parallel: 2 + matrix: + container: [ + irrd + ] + steps: + # Checkout repository + # https://github.com/actions/checkout + - name: Checkout repository + uses: actions/checkout@v4.2.0 + # Set up QEMU + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.2.0 + # Set up Docker Buildx + # https://github.com/docker/setup-buildx-action + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.6.1 + with: + buildkitd-config-inline: | + [registry."docker.io"] + mirrors = ["registry-mirror:5000"] + [registry."registry-mirror:5000"] + http = true + driver-opts: | + network=mattflix + # Build and export image to Docker daemon + # https://github.com/docker/build-push-action + - name: Build and export to Docker + uses: docker/build-push-action@v6.7.0 + with: + context: ${{ matrix.container }} + load: true + tags: "${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test" + # Test the built image + - name: Test image + run: | + set -x + timeout --kill-after=30s --preserve-status 30s \ + docker container run --attach stdout --attach stderr --rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test + # Remove the test image + - name: Remove test image + if: ${{ !cancelled() }} + run: | + set -x + docker image rm ${{ needs.build-setup.outputs.repo-owner }}/${{ matrix.container }}:test