From 3e60f72d1f5a50e7dabf9516fde9ca088475e015 Mon Sep 17 00:00:00 2001 From: yxxhero <11087727+yxxhero@users.noreply.github.com> Date: Sat, 18 Jun 2022 17:13:32 +0800 Subject: [PATCH] docker build test on ci (#164) * docker build test on ci Signed-off-by: yxxhero * fix issue Signed-off-by: yxxhero * fix issue Signed-off-by: yxxhero --- .github/workflows/images.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml index c6e99294..21f30b27 100644 --- a/.github/workflows/images.yaml +++ b/.github/workflows/images.yaml @@ -1,6 +1,8 @@ name: Images on: + pull_request: + branches: [ main ] push: branches: - main @@ -19,7 +21,7 @@ on: jobs: build-test: - if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/pull/') runs-on: ubuntu-latest permissions: contents: read @@ -29,12 +31,19 @@ jobs: include: - dockerfile: Dockerfile - dockerfile: Dockerfile.debian + - dockerfile: Dockerfile.ubuntu steps: - name: Checkout uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: ${{ matrix.dockerfile }} platforms: linux/amd64,linux/arm64