mirror of
https://github.com/docker/build-push-action.git
synced 2024-11-13 21:33:58 +00:00
Simplify workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
c9c37b8060
commit
b4bae2181a
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -39,7 +39,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.buildx-version }}
|
version: ${{ matrix.buildx-version }}
|
||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
buildkitd-flags: --allow-insecure-entitlement security.insecure
|
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
@ -48,7 +47,6 @@ jobs:
|
|||||||
file: ./test/Dockerfile
|
file: ./test/Dockerfile
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
allow: network.host,security.insecure
|
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
localhost:5000/name/app:latest
|
localhost:5000/name/app:latest
|
||||||
@ -96,7 +94,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.buildx-version }}
|
version: ${{ matrix.buildx-version }}
|
||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
buildkitd-flags: --allow-insecure-entitlement security.insecure
|
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
@ -105,7 +102,6 @@ jobs:
|
|||||||
context: ./test
|
context: ./test
|
||||||
file: ./test/Dockerfile
|
file: ./test/Dockerfile
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
allow: network.host,security.insecure
|
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
localhost:5000/name/app:latest
|
localhost:5000/name/app:latest
|
||||||
@ -154,7 +150,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.buildx-version }}
|
version: ${{ matrix.buildx-version }}
|
||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
buildkitd-flags: --allow-insecure-entitlement security.insecure
|
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
id: docker_build
|
id: docker_build
|
||||||
@ -164,7 +159,6 @@ jobs:
|
|||||||
file: ./test/Dockerfile-${{ matrix.dockerfile }}
|
file: ./test/Dockerfile-${{ matrix.dockerfile }}
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
allow: network.host,security.insecure
|
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
localhost:5000/name/app:latest
|
localhost:5000/name/app:latest
|
||||||
@ -203,7 +197,6 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@master
|
uses: docker/setup-buildx-action@master
|
||||||
with:
|
with:
|
||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
buildkitd-flags: --allow-insecure-entitlement security.insecure
|
|
||||||
-
|
-
|
||||||
name: Cache Docker layers
|
name: Cache Docker layers
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -222,7 +215,6 @@ jobs:
|
|||||||
file: ./test/Dockerfile-multi-golang
|
file: ./test/Dockerfile-multi-golang
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
allow: network.host,security.insecure
|
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
localhost:5000/name/app:latest
|
localhost:5000/name/app:latest
|
||||||
|
@ -239,12 +239,10 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@master
|
uses: docker/setup-buildx-action@master
|
||||||
with:
|
with:
|
||||||
driver-opts: network=host
|
driver-opts: network=host
|
||||||
#buildkitd-flags: --allow-insecure-entitlement security.insecure # default
|
|
||||||
-
|
-
|
||||||
name: Build and push to local registry
|
name: Build and push to local registry
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
allow: network.host,security.insecure
|
|
||||||
push: true
|
push: true
|
||||||
tags: localhost:5000/name/app:latest
|
tags: localhost:5000/name/app:latest
|
||||||
-
|
-
|
||||||
@ -288,16 +286,12 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Build and push
|
name: Build and push
|
||||||
id: docker_build
|
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: user/app:latest
|
tags: user/app:latest
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
-
|
|
||||||
name: Image digest
|
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Complete workflow
|
### Complete workflow
|
||||||
@ -349,7 +343,6 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@master
|
uses: docker/setup-qemu-action@master
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@master
|
uses: docker/setup-buildx-action@master
|
||||||
-
|
-
|
||||||
name: Login to DockerHub
|
name: Login to DockerHub
|
||||||
@ -363,7 +356,6 @@ jobs:
|
|||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64,linux/386
|
platforms: linux/amd64,linux/arm64,linux/386
|
||||||
|
Loading…
Reference in New Issue
Block a user