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
|
name: Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
@ -19,7 +21,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test:
|
build-test:
|
||||||
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/pull/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
@ -29,12 +31,19 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- dockerfile: Dockerfile
|
- dockerfile: Dockerfile
|
||||||
- dockerfile: Dockerfile.debian
|
- dockerfile: Dockerfile.debian
|
||||||
|
- dockerfile: Dockerfile.ubuntu
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
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
|
- name: Build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
file: ${{ matrix.dockerfile }}
|
file: ${{ matrix.dockerfile }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue