mirror of
https://github.com/docker/build-push-action.git
synced 2024-12-25 00:02:13 -05:00
Update CI workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
86856eb412
commit
32351da9d7
1 changed files with 48 additions and 6 deletions
54
.github/workflows/ci.yml
vendored
54
.github/workflows/ci.yml
vendored
|
@ -11,11 +11,53 @@ on:
|
|||
jobs:
|
||||
git-context:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
buildx-version:
|
||||
- latest
|
||||
services:
|
||||
registry:
|
||||
image: registry:2
|
||||
ports:
|
||||
- 5000:5000
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2.3.2
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: all
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: latest
|
||||
driver-opts: network=host
|
||||
-
|
||||
name: Build and push
|
||||
id: docker_build
|
||||
uses: ./
|
||||
with:
|
||||
file: ./test/Dockerfile
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
localhost:5000/name/app:latest
|
||||
localhost:5000/name/app:1.0.0
|
||||
-
|
||||
name: Inspect
|
||||
run: |
|
||||
docker buildx imagetools inspect localhost:5000/name/app:1.0.0
|
||||
-
|
||||
name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
-
|
||||
name: Dump context
|
||||
if: always()
|
||||
uses: crazy-max/ghaction-dump-context@v1
|
||||
|
||||
git-context-secret:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
registry:
|
||||
image: registry:2
|
||||
|
@ -50,7 +92,7 @@ jobs:
|
|||
localhost:5000/name/app:latest
|
||||
localhost:5000/name/app:1.0.0
|
||||
secrets: |
|
||||
GIT_AUTH_TOKEN=${{ github.token }}
|
||||
GIT_AUTH_TOKEN=01234567890abcdefgh
|
||||
-
|
||||
name: Inspect
|
||||
run: |
|
||||
|
|
Loading…
Reference in a new issue