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:
parent
092c4ed671
commit
3e60f72d1f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue