From b3242d7a0c5e67e68148a2e24c397b5dc4c3602b Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Thu, 6 Feb 2025 08:01:28 +0100 Subject: [PATCH] Use action to handle testing --- .github/workflows/main.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01af003..11ab857 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: jobs: supported-platform-matrix: name: Supported processor platforms - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: platform: ${{ steps.supported-platform-matrix.outputs.platform }} steps: @@ -17,7 +17,7 @@ jobs: uses: WyriHaximus/github-action-oci-image-supported-platforms@main lint-dockerfile: name: Lint Dockerfile - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Lint Dockerfile @@ -34,7 +34,7 @@ jobs: needs: - supported-platform-matrix - lint-dockerfile - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Prepare run: | @@ -66,7 +66,7 @@ jobs: needs: - supported-platform-matrix - build-docker-image - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Prepare run: | @@ -89,7 +89,7 @@ jobs: fail-fast: false matrix: platform: ${{ fromJson(needs.supported-platform-matrix.outputs.platform) }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Prepare run: | @@ -104,7 +104,10 @@ jobs: path: /tmp/docker-image - run: docker load --input /tmp/docker-image/docker_image-${{ env.PLATFORM_PAIR }}.tar - run: docker image ls -a - - run: ./tests.sh "${DOCKER_IMAGE}:${{ env.PLATFORM_PAIR }}" + - uses: WyriHaximus/github-action-testinfra@main + with: + image: ${{ env.DOCKER_IMAGE }}:${{ env.PLATFORM_PAIR }} + flags: --platform="${{ matrix.platform }}" push-image: if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main' name: Push @@ -112,7 +115,7 @@ jobs: - supported-platform-matrix - scan-vulnerability - tests - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: registry: image: registry:2