docker build test on ci (#164)

* docker build test on ci

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix issue

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix issue

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2022-06-18 17:13:32 +08:00 committed by GitHub
parent 092c4ed671
commit 3e60f72d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -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