2020-08-15 22:36:41 +00:00
|
|
|
name: ci
|
|
|
|
|
2023-09-05 08:59:10 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-08-15 22:36:41 +00:00
|
|
|
on:
|
2020-10-22 22:38:26 +00:00
|
|
|
workflow_dispatch:
|
2022-08-12 14:45:35 +00:00
|
|
|
inputs:
|
|
|
|
buildx-version:
|
|
|
|
description: 'Buildx version or Git context'
|
|
|
|
default: 'latest'
|
|
|
|
required: false
|
|
|
|
buildkit-image:
|
|
|
|
description: 'BuildKit image'
|
|
|
|
default: 'moby/buildkit:buildx-stable-1'
|
|
|
|
required: false
|
2023-02-20 21:54:11 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '0 10 * * *'
|
2020-08-15 22:36:41 +00:00
|
|
|
push:
|
2020-09-12 18:53:25 +00:00
|
|
|
branches:
|
2022-01-18 13:57:27 +00:00
|
|
|
- 'master'
|
2023-02-20 21:54:11 +00:00
|
|
|
- 'releases/v*'
|
2020-08-15 22:36:41 +00:00
|
|
|
pull_request:
|
|
|
|
|
2022-08-17 00:17:37 +00:00
|
|
|
env:
|
2023-11-16 13:21:56 +00:00
|
|
|
BUILDX_VERSION: latest
|
2022-08-17 00:17:37 +00:00
|
|
|
BUILDKIT_IMAGE: moby/buildkit:buildx-stable-1
|
|
|
|
|
2020-08-15 22:36:41 +00:00
|
|
|
jobs:
|
2020-10-19 20:17:35 +00:00
|
|
|
minimal:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-10-19 20:17:35 +00:00
|
|
|
with:
|
|
|
|
path: action
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-08-12 14:45:35 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2020-10-19 20:17:35 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./action
|
|
|
|
with:
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
|
2020-09-02 08:07:11 +00:00
|
|
|
git-context:
|
2020-08-17 20:18:15 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-09-22 18:53:40 +00:00
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-10-03 20:44:16 +00:00
|
|
|
with:
|
|
|
|
path: action
|
2020-09-22 18:53:40 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2023-09-12 11:17:07 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-09-22 18:53:40 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-09-22 18:53:40 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2020-09-22 18:53:40 +00:00
|
|
|
-
|
|
|
|
name: Build and push
|
|
|
|
id: docker_build
|
2020-10-03 20:44:16 +00:00
|
|
|
uses: ./action
|
2020-09-22 18:53:40 +00:00
|
|
|
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: |
|
2023-01-11 13:03:02 +00:00
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
|
2020-10-21 07:51:06 +00:00
|
|
|
-
|
|
|
|
name: Check digest
|
|
|
|
run: |
|
|
|
|
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
|
|
|
|
echo "::error::Digest should not be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-09-22 18:53:40 +00:00
|
|
|
|
|
|
|
git-context-secret:
|
|
|
|
runs-on: ubuntu-latest
|
2020-09-05 03:18:15 +00:00
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
2020-08-17 20:18:15 +00:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-10-03 20:44:16 +00:00
|
|
|
with:
|
|
|
|
path: action
|
2020-08-17 20:18:15 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2023-09-12 11:17:07 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-08-17 20:18:15 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-08-17 20:18:15 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2020-08-17 20:18:15 +00:00
|
|
|
-
|
|
|
|
name: Build and push
|
|
|
|
id: docker_build
|
2020-10-03 20:44:16 +00:00
|
|
|
uses: ./action
|
2020-08-17 20:18:15 +00:00
|
|
|
with:
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
builder: ${{ steps.buildx.outputs.name }}
|
2020-09-02 08:07:11 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2020-08-17 20:18:15 +00:00
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
localhost:5000/name/app:latest
|
|
|
|
localhost:5000/name/app:1.0.0
|
2020-09-02 08:07:11 +00:00
|
|
|
secrets: |
|
2020-09-23 09:04:40 +00:00
|
|
|
GIT_AUTH_TOKEN=${{ github.token }}
|
2020-11-17 20:38:45 +00:00
|
|
|
"MYSECRET=aaaaaaaa
|
|
|
|
bbbbbbb
|
|
|
|
ccccccccc"
|
|
|
|
FOO=bar
|
|
|
|
"EMPTYLINE=aaaa
|
|
|
|
|
|
|
|
bbbb
|
|
|
|
ccc"
|
2020-08-17 20:18:15 +00:00
|
|
|
-
|
|
|
|
name: Inspect
|
|
|
|
run: |
|
2023-01-11 13:03:02 +00:00
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
|
2020-10-21 07:51:06 +00:00
|
|
|
-
|
|
|
|
name: Check digest
|
|
|
|
run: |
|
|
|
|
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
|
|
|
|
echo "::error::Digest should not be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-08-17 20:18:15 +00:00
|
|
|
|
2020-09-02 08:07:11 +00:00
|
|
|
path-context:
|
2020-08-15 22:36:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-09-05 03:18:15 +00:00
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
2020-08-15 22:36:41 +00:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-08-15 22:36:41 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2023-09-12 11:17:07 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-08-15 22:36:41 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-08-17 00:33:38 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2020-08-15 22:36:41 +00:00
|
|
|
-
|
|
|
|
name: Build and push
|
2020-08-23 02:07:29 +00:00
|
|
|
id: docker_build
|
2020-08-15 22:36:41 +00:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
2020-09-02 08:07:11 +00:00
|
|
|
file: ./test/Dockerfile
|
2020-08-16 01:21:48 +00:00
|
|
|
builder: ${{ steps.buildx.outputs.name }}
|
2020-08-17 00:33:38 +00:00
|
|
|
push: true
|
2020-08-15 22:36:41 +00:00
|
|
|
tags: |
|
|
|
|
localhost:5000/name/app:latest
|
|
|
|
localhost:5000/name/app:1.0.0
|
2020-08-17 00:42:46 +00:00
|
|
|
-
|
|
|
|
name: Inspect
|
|
|
|
run: |
|
2023-01-11 13:03:02 +00:00
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
|
2020-10-21 00:46:41 +00:00
|
|
|
-
|
|
|
|
name: Check digest
|
|
|
|
run: |
|
|
|
|
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
|
|
|
|
echo "::error::Digest should not be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-08-16 15:18:08 +00:00
|
|
|
|
2023-02-20 21:59:45 +00:00
|
|
|
example:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DOCKER_IMAGE: localhost:5000/name/app
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-20 21:59:45 +00:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
2023-09-12 11:17:15 +00:00
|
|
|
uses: docker/metadata-action@v5
|
2023-02-20 21:59:45 +00:00
|
|
|
with:
|
|
|
|
images: ${{ env.DOCKER_IMAGE }}
|
|
|
|
tags: |
|
|
|
|
type=schedule
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
type=semver,pattern={{major}}
|
|
|
|
type=sha
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-02-20 21:59:45 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build and export to Docker client
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
load: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
-
|
|
|
|
name: Build and push to local registry
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
-
|
|
|
|
name: Inspect image
|
|
|
|
run: |
|
|
|
|
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
|
|
|
|
-
|
|
|
|
name: Check manifest
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
run: |
|
|
|
|
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} --format '{{json .}}'
|
|
|
|
|
2020-10-21 19:07:52 +00:00
|
|
|
error:
|
2021-04-27 14:16:22 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-04-27 14:16:22 +00:00
|
|
|
-
|
|
|
|
name: Stop docker
|
|
|
|
run: |
|
2023-09-05 07:26:58 +00:00
|
|
|
sudo systemctl stop docker docker.socket
|
2021-04-27 14:16:22 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
id: docker_build
|
|
|
|
continue-on-error: true
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
-
|
|
|
|
name: Check
|
|
|
|
run: |
|
|
|
|
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
|
|
|
|
echo "::error::Should have failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
error-buildx:
|
2020-10-21 19:07:52 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-10-21 19:07:52 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2023-09-12 11:17:07 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-10-21 19:07:52 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-08-12 14:45:35 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2020-10-21 19:07:52 +00:00
|
|
|
-
|
|
|
|
name: Build
|
2020-10-22 22:38:26 +00:00
|
|
|
id: docker_build
|
2020-10-21 19:07:52 +00:00
|
|
|
continue-on-error: true
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
|
|
|
push: true
|
|
|
|
tags: localhost:5000/name/app:latest
|
2020-10-22 22:38:26 +00:00
|
|
|
-
|
|
|
|
name: Check
|
|
|
|
run: |
|
|
|
|
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
|
|
|
|
echo "::error::Should have failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-10-21 19:07:52 +00:00
|
|
|
|
|
|
|
docker-driver:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-10-21 19:07:52 +00:00
|
|
|
-
|
|
|
|
name: Build
|
2020-10-22 22:38:26 +00:00
|
|
|
id: docker_build
|
2020-10-21 19:07:52 +00:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
2021-01-15 18:21:19 +00:00
|
|
|
push: true
|
2020-10-21 19:07:52 +00:00
|
|
|
tags: localhost:5000/name/app:latest
|
|
|
|
|
2020-10-22 19:50:22 +00:00
|
|
|
export-docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-10-22 19:50:22 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
load: true
|
|
|
|
tags: myimage:latest
|
|
|
|
-
|
|
|
|
name: Inspect
|
|
|
|
run: |
|
|
|
|
docker image inspect myimage:latest
|
|
|
|
|
2022-10-09 15:39:54 +00:00
|
|
|
secret:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-10-09 15:39:54 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-10-09 15:39:54 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./test/secret.Dockerfile
|
|
|
|
secrets: |
|
|
|
|
MYSECRET=foo
|
|
|
|
INVALID_SECRET=
|
|
|
|
|
2023-10-12 12:32:49 +00:00
|
|
|
secret-envs:
|
2023-09-26 14:34:10 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set up Docker buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
env:
|
|
|
|
ENV_SECRET: foo
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./test/secret.Dockerfile
|
|
|
|
secret-envs: |
|
|
|
|
MYSECRET=ENV_SECRET
|
|
|
|
INVALID_SECRET=
|
|
|
|
|
2021-04-06 12:49:15 +00:00
|
|
|
network:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-04-06 12:49:15 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-08-12 14:45:35 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2021-04-06 12:49:15 +00:00
|
|
|
-
|
|
|
|
name: List networks
|
|
|
|
run: docker network ls
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
tags: name/app:latest
|
|
|
|
network: host
|
|
|
|
|
2021-11-16 06:19:27 +00:00
|
|
|
shm-size:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-11-16 06:19:27 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-11-16 06:19:27 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2021-11-16 06:19:27 +00:00
|
|
|
driver-opts: |
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2021-11-16 06:19:27 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/shmsize.Dockerfile
|
|
|
|
tags: name/app:latest
|
|
|
|
shm-size: 2g
|
|
|
|
|
|
|
|
ulimit:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-11-16 06:19:27 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-11-16 06:19:27 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2021-11-16 06:19:27 +00:00
|
|
|
driver-opts: |
|
2022-08-12 14:45:35 +00:00
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2021-11-16 06:19:27 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/ulimit.Dockerfile
|
|
|
|
tags: name/app:latest
|
|
|
|
ulimit: |
|
|
|
|
nofile=1024:1024
|
|
|
|
nproc=3
|
|
|
|
|
|
|
|
cgroup-parent:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-11-16 06:19:27 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-11-16 06:19:27 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2021-11-16 06:19:27 +00:00
|
|
|
driver-opts: |
|
2022-08-12 14:45:35 +00:00
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2021-11-16 06:19:27 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/cgroup.Dockerfile
|
|
|
|
tags: name/app:latest
|
|
|
|
cgroup-parent: foo
|
|
|
|
|
2022-01-31 10:47:45 +00:00
|
|
|
add-hosts:
|
2022-01-30 17:33:31 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-01-30 17:33:31 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-08-12 14:45:35 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2022-01-30 17:33:31 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/addhost.Dockerfile
|
|
|
|
tags: name/app:latest
|
2022-01-31 10:47:45 +00:00
|
|
|
add-hosts: |
|
2022-01-30 17:33:31 +00:00
|
|
|
docker:10.180.0.1
|
|
|
|
foo:10.0.0.1
|
|
|
|
|
2022-07-18 15:24:11 +00:00
|
|
|
no-cache-filters:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-07-18 15:24:11 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-08-12 14:45:35 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2022-07-18 15:24:11 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/nocachefilter.Dockerfile
|
|
|
|
no-cache-filters: build
|
|
|
|
tags: name/app:latest
|
|
|
|
cache-from: type=gha,scope=nocachefilter
|
|
|
|
cache-to: type=gha,scope=nocachefilter,mode=max
|
|
|
|
|
2023-01-11 11:10:34 +00:00
|
|
|
attests-compat:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- buildx: latest
|
|
|
|
buildkit: moby/buildkit:buildx-stable-1
|
|
|
|
- buildx: latest
|
|
|
|
buildkit: moby/buildkit:v0.10.6
|
|
|
|
- buildx: v0.9.1
|
|
|
|
buildkit: moby/buildkit:buildx-stable-1
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-01-11 11:10:34 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-01-11 11:10:34 +00:00
|
|
|
with:
|
|
|
|
version: ${{ matrix.buildx }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
|
|
|
image=${{ matrix.buildkit }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test/go
|
|
|
|
file: ./test/go/Dockerfile
|
|
|
|
outputs: type=cacheonly
|
|
|
|
|
2023-01-13 09:02:50 +00:00
|
|
|
provenance:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-11-17 10:34:55 +00:00
|
|
|
include:
|
|
|
|
- target: image
|
|
|
|
output: type=image,name=localhost:5000/name/app:latest,push=true
|
|
|
|
attr: mode=max
|
|
|
|
- target: image
|
|
|
|
output: type=image,name=localhost:5000/name/app:latest,push=true
|
|
|
|
attr: ''
|
|
|
|
- target: binary
|
|
|
|
output: /tmp/buildx-build
|
|
|
|
attr: mode=max
|
|
|
|
- target: binary
|
|
|
|
output: /tmp/buildx-build
|
|
|
|
attr: ''
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
2023-01-13 09:02:50 +00:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-01-13 09:02:50 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-01-13 09:02:50 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test/go
|
|
|
|
file: ./test/go/Dockerfile
|
2023-11-17 10:34:55 +00:00
|
|
|
target: ${{ matrix.target }}
|
|
|
|
outputs: ${{ matrix.output }}
|
|
|
|
provenance: ${{ matrix.attr }}
|
|
|
|
-
|
|
|
|
name: Inspect Provenance
|
|
|
|
if: matrix.target == 'image'
|
|
|
|
run: |
|
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .Provenance}}'
|
|
|
|
-
|
|
|
|
name: Check output folder
|
|
|
|
if: matrix.target == 'binary'
|
|
|
|
run: |
|
|
|
|
tree /tmp/buildx-build
|
|
|
|
-
|
|
|
|
name: Print local Provenance
|
|
|
|
if: matrix.target == 'binary'
|
|
|
|
run: |
|
|
|
|
cat /tmp/buildx-build/provenance.json | jq
|
2023-01-13 09:02:50 +00:00
|
|
|
|
2023-01-11 11:10:34 +00:00
|
|
|
sbom:
|
2023-01-11 11:12:09 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- target: image
|
|
|
|
output: type=image,name=localhost:5000/name/app:latest,push=true
|
|
|
|
- target: binary
|
|
|
|
output: /tmp/buildx-build
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-01-11 11:12:09 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-01-11 11:12:09 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test/go
|
|
|
|
file: ./test/go/Dockerfile
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
outputs: ${{ matrix.output }}
|
2022-12-20 05:17:29 +00:00
|
|
|
sbom: true
|
2023-01-11 11:12:09 +00:00
|
|
|
cache-from: type=gha,scope=attests-${{ matrix.target }}
|
|
|
|
cache-to: type=gha,scope=attests-${{ matrix.target }},mode=max
|
|
|
|
-
|
2023-11-17 10:34:55 +00:00
|
|
|
name: Inspect SBOM
|
2023-01-11 11:12:09 +00:00
|
|
|
if: matrix.target == 'image'
|
|
|
|
run: |
|
2023-11-17 10:34:55 +00:00
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .SBOM}}'
|
2023-01-11 11:12:09 +00:00
|
|
|
-
|
|
|
|
name: Check output folder
|
|
|
|
if: matrix.target == 'binary'
|
|
|
|
run: |
|
|
|
|
tree /tmp/buildx-build
|
2023-01-30 18:21:25 +00:00
|
|
|
-
|
2023-11-17 10:34:55 +00:00
|
|
|
name: Print local SBOM
|
2023-01-11 11:12:09 +00:00
|
|
|
if: matrix.target == 'binary'
|
|
|
|
run: |
|
|
|
|
cat /tmp/buildx-build/sbom.spdx.json | jq
|
|
|
|
|
2020-09-02 08:07:11 +00:00
|
|
|
multi:
|
2020-08-29 14:10:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-09-02 08:07:11 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
dockerfile:
|
|
|
|
- multi
|
|
|
|
- multi-sudo
|
2020-09-05 03:18:15 +00:00
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
2020-08-29 14:10:05 +00:00
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-08-29 14:10:05 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2023-09-12 11:17:07 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-08-29 14:10:05 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-08-29 14:10:05 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2020-08-29 14:10:05 +00:00
|
|
|
-
|
|
|
|
name: Build and push
|
|
|
|
id: docker_build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
2021-03-28 14:43:51 +00:00
|
|
|
file: ./test/${{ matrix.dockerfile }}.Dockerfile
|
2020-08-29 14:10:05 +00:00
|
|
|
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: |
|
2023-01-11 13:03:02 +00:00
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
|
2020-10-21 07:51:06 +00:00
|
|
|
-
|
|
|
|
name: Check digest
|
|
|
|
run: |
|
|
|
|
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
|
|
|
|
echo "::error::Digest should not be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-03-14 18:30:50 +00:00
|
|
|
|
|
|
|
digest:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DOCKER_IMAGE: localhost:5000/name/app
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
driver:
|
|
|
|
- docker
|
|
|
|
- docker-container
|
|
|
|
load:
|
|
|
|
- true
|
|
|
|
- false
|
|
|
|
push:
|
|
|
|
- true
|
|
|
|
- false
|
|
|
|
exclude:
|
|
|
|
- driver: docker
|
|
|
|
load: true
|
|
|
|
push: true
|
|
|
|
- driver: docker-container
|
|
|
|
load: true
|
|
|
|
push: true
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-08-29 14:10:05 +00:00
|
|
|
-
|
2022-03-14 18:30:50 +00:00
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-03-14 18:30:50 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-03-14 18:30:50 +00:00
|
|
|
driver: ${{ matrix.driver }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
id: docker_build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
load: ${{ matrix.load }}
|
|
|
|
push: ${{ matrix.push }}
|
|
|
|
tags: ${{ env.DOCKER_IMAGE }}:latest
|
|
|
|
platforms: ${{ matrix.platforms }}
|
|
|
|
-
|
|
|
|
name: Docker images
|
|
|
|
run: |
|
|
|
|
docker image ls --no-trunc
|
|
|
|
-
|
|
|
|
name: Check digest
|
|
|
|
run: |
|
2023-08-11 09:52:26 +00:00
|
|
|
if [[ "${{ matrix.driver }}" = "docker-container" ]] && [[ "${{ matrix.load }}" = "false" ]] && [[ "${{ matrix.push }}" = "false" ]]; then
|
|
|
|
if [ -n "${{ steps.docker_build.outputs.digest }}" ]; then
|
|
|
|
echo "::error::Digest should be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [[ "${{ matrix.push }}" = "true" ]] && [[ -z "${{ steps.docker_build.outputs.digest }}" ]]; then
|
2022-03-14 18:30:50 +00:00
|
|
|
echo "::error::Digest should not be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
-
|
|
|
|
name: Check manifest
|
|
|
|
if: ${{ matrix.push }}
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}@${{ steps.docker_build.outputs.digest }} --format '{{json .}}'
|
|
|
|
-
|
|
|
|
name: Check image ID
|
|
|
|
run: |
|
2023-08-11 09:52:26 +00:00
|
|
|
if [[ "${{ matrix.driver }}" = "docker-container" ]] && [[ "${{ matrix.load }}" = "false" ]] && [[ "${{ matrix.push }}" = "false" ]]; then
|
|
|
|
if [ -n "${{ steps.docker_build.outputs.imageid }}" ]; then
|
|
|
|
echo "::error::Image ID should be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [ -z "${{ steps.docker_build.outputs.imageid }}" ]; then
|
2022-03-14 18:30:50 +00:00
|
|
|
echo "::error::Image ID should not be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-08-29 14:10:05 +00:00
|
|
|
-
|
2022-03-14 18:30:50 +00:00
|
|
|
name: Inspect image
|
|
|
|
if: ${{ matrix.load }}
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
docker image inspect ${{ steps.docker_build.outputs.imageid }}
|
2020-08-29 14:10:05 +00:00
|
|
|
|
2020-10-03 22:01:14 +00:00
|
|
|
registry-cache:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-10-03 22:01:14 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2023-09-12 11:17:07 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-10-03 22:01:14 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-10-03 22:01:14 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2020-10-11 17:17:08 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2020-10-03 22:01:14 +00:00
|
|
|
-
|
2023-01-11 13:32:33 +00:00
|
|
|
name: Build and push
|
2020-10-03 22:01:14 +00:00
|
|
|
id: docker_build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
2021-03-28 14:43:51 +00:00
|
|
|
file: ./test/multi.Dockerfile
|
2020-10-03 22:01:14 +00:00
|
|
|
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
|
2020-10-03 23:10:42 +00:00
|
|
|
cache-from: type=registry,ref=localhost:5000/name/app
|
|
|
|
cache-to: type=inline
|
2020-10-03 22:01:14 +00:00
|
|
|
-
|
2023-01-11 13:32:33 +00:00
|
|
|
name: Inspect
|
2020-10-03 22:01:14 +00:00
|
|
|
run: |
|
2023-01-11 13:03:02 +00:00
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
|
2020-10-21 07:51:06 +00:00
|
|
|
-
|
2023-01-11 13:32:33 +00:00
|
|
|
name: Check digest
|
2020-10-21 07:51:06 +00:00
|
|
|
run: |
|
|
|
|
if [ -z "${{ steps.docker_build.outputs.digest }}" ]; then
|
|
|
|
echo "::error::Digest should not be empty"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-10-03 22:01:14 +00:00
|
|
|
|
2021-07-29 14:57:22 +00:00
|
|
|
github-cache:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-07-29 14:57:22 +00:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2023-09-12 11:17:07 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2021-07-29 14:57:22 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-07-29 14:57:22 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2021-07-29 14:57:22 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2021-07-29 14:57:22 +00:00
|
|
|
buildkitd-flags: --debug
|
|
|
|
-
|
|
|
|
name: Build and push
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/multi.Dockerfile
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
localhost:5000/name/app:latest
|
|
|
|
localhost:5000/name/app:1.0.0
|
|
|
|
cache-from: type=gha,scope=ci-${{ matrix.buildx_version }}
|
|
|
|
cache-to: type=gha,scope=ci-${{ matrix.buildx_version }}
|
|
|
|
-
|
|
|
|
name: Inspect
|
|
|
|
run: |
|
2023-01-11 13:03:02 +00:00
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
|
2022-04-28 07:31:47 +00:00
|
|
|
|
2024-02-28 14:43:21 +00:00
|
|
|
local-cache:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
buildkitd-flags: --debug
|
|
|
|
-
|
|
|
|
name: Cache Build
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: /tmp/.buildx-cache
|
|
|
|
key: ${{ runner.os }}-local-test-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-local-test-
|
|
|
|
-
|
|
|
|
name: Build and push
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/multi.Dockerfile
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
localhost:5000/name/app:latest
|
|
|
|
localhost:5000/name/app:1.0.0
|
|
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
|
|
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
|
|
|
-
|
|
|
|
name: Inspect
|
|
|
|
run: |
|
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:1.0.0 --format '{{json .}}'
|
|
|
|
-
|
|
|
|
# Temp fix
|
|
|
|
# https://github.com/docker/build-push-action/issues/252
|
|
|
|
# https://github.com/moby/buildkit/issues/1896
|
|
|
|
name: Move cache
|
|
|
|
run: |
|
|
|
|
rm -rf /tmp/.buildx-cache
|
|
|
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
|
|
|
|
2022-04-28 07:31:47 +00:00
|
|
|
standalone:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-04-28 07:31:47 +00:00
|
|
|
-
|
2023-09-05 07:26:58 +00:00
|
|
|
name: Uninstall docker cli
|
2022-04-28 07:31:47 +00:00
|
|
|
run: |
|
2023-09-05 07:26:58 +00:00
|
|
|
if dpkg -s "docker-ce" >/dev/null 2>&1; then
|
|
|
|
sudo dpkg -r --force-depends docker-ce-cli docker-buildx-plugin
|
|
|
|
else
|
|
|
|
sudo apt-get purge -y moby-cli moby-buildx
|
|
|
|
fi
|
2022-04-28 07:31:47 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-08-12 14:45:35 +00:00
|
|
|
with:
|
2022-08-17 00:17:37 +00:00
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
2022-08-12 14:45:35 +00:00
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2022-08-17 00:17:37 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2022-04-28 07:31:47 +00:00
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
2023-02-23 13:02:47 +00:00
|
|
|
|
|
|
|
named-context-pin:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-23 13:02:47 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-02-23 13:02:47 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build base image
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/named-context.Dockerfile
|
|
|
|
build-contexts: |
|
|
|
|
alpine=docker-image://alpine:edge
|
|
|
|
|
|
|
|
named-context-docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-23 13:02:47 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-02-23 13:02:47 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver: docker
|
|
|
|
-
|
|
|
|
name: Build base image
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/named-context-base.Dockerfile
|
|
|
|
load: true
|
|
|
|
tags: my-base-image:local
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/named-context.Dockerfile
|
|
|
|
build-contexts: |
|
|
|
|
base=docker-image://my-base-image:local
|
|
|
|
|
|
|
|
named-context-container:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-02-23 13:02:47 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-02-23 13:02:47 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
network=host
|
|
|
|
-
|
|
|
|
name: Build base image
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/named-context-base.Dockerfile
|
|
|
|
tags: localhost:5000/my-base-image:latest
|
|
|
|
push: true
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/named-context.Dockerfile
|
|
|
|
build-contexts: |
|
|
|
|
alpine=docker-image://localhost:5000/my-base-image:latest
|
2023-06-05 09:35:09 +00:00
|
|
|
|
2023-09-08 13:28:08 +00:00
|
|
|
docker-config-malformed:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set malformed docker config
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.docker
|
|
|
|
echo 'foo_bar' >> ~/.docker/config.json
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
|
2023-06-05 09:35:09 +00:00
|
|
|
proxy-docker-config:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
squid-proxy:
|
|
|
|
image: ubuntu/squid:latest
|
|
|
|
ports:
|
|
|
|
- 3128:3128
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Check proxy
|
|
|
|
run: |
|
|
|
|
netstat -aptn
|
|
|
|
curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-06-05 09:35:09 +00:00
|
|
|
-
|
|
|
|
name: Set proxy config
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.docker
|
|
|
|
echo '{"proxies":{"default":{"httpProxy":"http://127.0.0.1:3128","httpsProxy":"http://127.0.0.1:3128"}}}' > ~/.docker/config.json
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-06-05 09:35:09 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
network=host
|
|
|
|
buildkitd-flags: --debug
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/proxy.Dockerfile
|
|
|
|
|
|
|
|
proxy-buildkitd:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
squid-proxy:
|
|
|
|
image: ubuntu/squid:latest
|
|
|
|
ports:
|
|
|
|
- 3128:3128
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Check proxy
|
|
|
|
run: |
|
|
|
|
netstat -aptn
|
|
|
|
curl --retry 5 --retry-all-errors --retry-delay 0 --connect-timeout 5 --proxy http://127.0.0.1:3128 -v --insecure --head https://www.google.com
|
|
|
|
-
|
|
|
|
name: Checkout
|
2023-09-05 07:31:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-06-05 09:35:09 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-09-12 11:17:11 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-06-05 09:35:09 +00:00
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
network=host
|
|
|
|
env.http_proxy=http://127.0.0.1:3128
|
|
|
|
env.https_proxy=http://127.0.0.1:3128
|
|
|
|
buildkitd-flags: --debug
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
2023-10-24 05:23:44 +00:00
|
|
|
|
|
|
|
annotations:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DOCKER_IMAGE: localhost:5000/name/app
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: ${{ env.DOCKER_IMAGE }}
|
|
|
|
tags: |
|
|
|
|
type=schedule
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
type=semver,pattern={{major}}
|
|
|
|
type=sha
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build and push to local registry
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
annotations: |
|
|
|
|
index:com.example.key=value
|
|
|
|
index:com.example.key2=value2
|
|
|
|
manifest:com.example.key3=value3
|
|
|
|
-
|
|
|
|
name: Check manifest
|
|
|
|
run: |
|
|
|
|
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }} --format '{{json .}}'
|
2024-03-08 13:00:50 +00:00
|
|
|
|
|
|
|
multi-output:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2024-04-15 07:47:50 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2024-03-08 13:00:50 +00:00
|
|
|
buildkitd-flags: --debug
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
outputs: |
|
|
|
|
type=image,name=localhost:5000/name/app:latest,push=true
|
|
|
|
type=docker,name=app:local
|
|
|
|
type=oci,dest=/tmp/oci.tar
|
|
|
|
-
|
|
|
|
name: Check registry
|
|
|
|
run: |
|
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
|
|
|
|
-
|
|
|
|
name: Check docker
|
|
|
|
run: |
|
|
|
|
docker image inspect app:local
|
|
|
|
-
|
|
|
|
name: Check oci
|
|
|
|
run: |
|
|
|
|
set -ex
|
|
|
|
mkdir -p /tmp/oci-out
|
|
|
|
tar xf /tmp/oci.tar -C /tmp/oci-out
|
|
|
|
tree -nh /tmp/oci-out
|
|
|
|
|
|
|
|
load-and-push:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
network=host
|
2024-04-15 07:47:50 +00:00
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
2024-03-08 13:00:50 +00:00
|
|
|
buildkitd-flags: --debug
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
load: true
|
|
|
|
push: true
|
|
|
|
tags: localhost:5000/name/app:latest
|
|
|
|
-
|
|
|
|
name: Check registry
|
|
|
|
run: |
|
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .}}'
|
|
|
|
-
|
|
|
|
name: Check docker
|
|
|
|
run: |
|
|
|
|
docker image inspect localhost:5000/name/app:latest
|
2024-05-15 07:40:14 +00:00
|
|
|
|
2024-06-27 09:26:35 +00:00
|
|
|
summary-disable:
|
2024-05-15 07:40:14 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: action
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./action
|
|
|
|
with:
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
env:
|
2024-07-02 15:38:24 +00:00
|
|
|
DOCKER_BUILD_SUMMARY: false
|
|
|
|
|
|
|
|
summary-disable-deprecated:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: action
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./action
|
|
|
|
with:
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
env:
|
|
|
|
DOCKER_BUILD_NO_SUMMARY: true
|
2024-06-24 08:14:14 +00:00
|
|
|
|
2024-06-27 09:26:35 +00:00
|
|
|
summary-not-supported:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: action
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: v0.12.1
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./action
|
|
|
|
with:
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
|
2024-07-02 16:07:54 +00:00
|
|
|
record-upload-disable:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: action
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./action
|
|
|
|
with:
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
env:
|
|
|
|
DOCKER_BUILD_RECORD_UPLOAD: false
|
|
|
|
|
2024-07-02 16:09:36 +00:00
|
|
|
record-retention-days:
|
2024-06-24 08:14:14 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
days:
|
|
|
|
- 2
|
|
|
|
- 0
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: action
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./action
|
|
|
|
with:
|
|
|
|
file: ./test/Dockerfile
|
|
|
|
env:
|
2024-07-02 16:09:36 +00:00
|
|
|
DOCKER_BUILD_RECORD_RETENTION_DAYS: ${{ matrix.days }}
|
2024-07-30 15:48:59 +00:00
|
|
|
|
|
|
|
checks:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
buildx-version:
|
|
|
|
- latest
|
|
|
|
- v0.14.1
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ matrix.buildx-version }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/lint.Dockerfile
|
2024-07-31 10:39:27 +00:00
|
|
|
|
|
|
|
annotations-disabled:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/lint.Dockerfile
|
|
|
|
env:
|
|
|
|
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
|
2024-11-25 16:14:29 +00:00
|
|
|
|
|
|
|
call-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
with:
|
|
|
|
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
|
|
|
driver-opts: |
|
|
|
|
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
|
|
|
-
|
|
|
|
name: Build
|
|
|
|
id: docker_build
|
|
|
|
continue-on-error: true
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
context: ./test
|
|
|
|
file: ./test/lint.Dockerfile
|
|
|
|
call: check
|
|
|
|
-
|
|
|
|
name: Check
|
|
|
|
run: |
|
|
|
|
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
|
|
|
|
echo "::error::Should have failed"
|
|
|
|
exit 1
|
|
|
|
fi
|