Compare commits

..

68 Commits

Author SHA1 Message Date
CrazyMax
7e094594be
Merge pull request #1282 from crazy-max/remove-buildkit-5561
Revert "init buildkit-5561 workflow"
2024-12-17 16:32:34 +01:00
CrazyMax
32ee877a58
Revert "init buildkit-5561 workflow"
This reverts commit f5a8591a7ff7468794d6a699b95c45220ef644f9.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:26:04 +01:00
CrazyMax
bcc9f4afe7
Merge pull request #1284 from crazy-max/dockerfiles-pin-bases
test: fix multi-sudo dockerfile
2024-12-17 16:18:44 +01:00
CrazyMax
da5b6c75b9
test: fix multi-sudo dockerfile
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 16:12:32 +01:00
CrazyMax
11be14d908
Merge pull request #1274 from crazy-max/init-buildkit-5561
init buildkit-5561 workflow
2024-12-05 15:27:22 +01:00
CrazyMax
f5a8591a7f
init buildkit-5561 workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-05 15:21:59 +01:00
CrazyMax
8796455d32
Merge pull request #1272 from crazy-max/update-readme
readme: move login step up
2024-12-03 16:04:51 +01:00
CrazyMax
750f367828
readme: move login step up
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-03 15:36:12 +01:00
CrazyMax
48aba3b46d
Merge pull request #1268 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.46.0
chore(deps): Bump @docker/actions-toolkit from 0.39.0 to 0.46.0
2024-11-26 11:20:57 +01:00
CrazyMax
678328cf8e
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 11:17:24 +01:00
dependabot[bot]
cdf0a37e6f
chore(deps): Bump @docker/actions-toolkit from 0.39.0 to 0.46.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.39.0 to 0.46.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.39.0...v0.46.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-26 10:16:04 +00:00
CrazyMax
d719b79de1
Merge pull request #1238 from docker/dependabot/npm_and_yarn/actions/core-1.11.1
chore(deps): Bump @actions/core from 1.10.1 to 1.11.1
2024-11-26 11:14:18 +01:00
CrazyMax
c333dfd43d
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 11:12:04 +01:00
dependabot[bot]
6b56a4c3f8
chore(deps): Bump @actions/core from 1.10.1 to 1.11.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.10.1 to 1.11.1.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-26 10:01:50 +00:00
CrazyMax
92fb0d73b6
Merge pull request #1259 from docker/dependabot/github_actions/codecov/codecov-action-5
chore(deps): Bump codecov/codecov-action from 4 to 5
2024-11-26 10:59:59 +01:00
CrazyMax
40532c5d6f
ci: fix deprecated input for codecov-action
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 10:56:40 +01:00
CrazyMax
70dd953427
Merge pull request #1267 from crazy-max/fix-allow
iterate over allow input values and push each separately
2024-11-26 10:54:57 +01:00
CrazyMax
41b4e8020e
Merge pull request #1261 from docker/dependabot/npm_and_yarn/cross-spawn-7.0.6
chore(deps): Bump cross-spawn from 7.0.3 to 7.0.6
2024-11-26 10:54:24 +01:00
CrazyMax
22cd91d73b
Merge pull request #1266 from crazy-max/update-trbsht
update troubleshooting markdown
2024-11-26 10:14:48 +01:00
CrazyMax
6bdcc4fb8c
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:30:39 +01:00
CrazyMax
b5e932e401
iterate over allow input values and push each separately
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:30:38 +01:00
CrazyMax
325a8bf0f1
update troubleshooting markdown
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-26 01:12:56 +01:00
Shaun Thompson
0259cb088b
Merge pull request #1265 from crazy-max/call-check
call input to set method for evaluating build
2024-11-25 14:51:52 -05:00
CrazyMax
1b8e4efb78
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-25 18:38:40 +01:00
CrazyMax
75ffdcce88
call input to set method for evaluating build
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-11-25 18:37:45 +01:00
dependabot[bot]
73b7dbf5d4
chore(deps): Bump cross-spawn from 7.0.3 to 7.0.6
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 22:35:50 +00:00
dependabot[bot]
f79ca49284
chore(deps): Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 11:05:57 +00:00
CrazyMax
5e99dacf67
Merge pull request #1245 from crazy-max/publish-immutable-action
ci: publish as immutable action workflow
2024-10-26 00:40:44 +02:00
CrazyMax
b249570060
ci: publish as immutable action workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-10-25 13:18:56 +02:00
CrazyMax
4f58ea7922
Merge pull request #1234 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.39.0
chore(deps): Bump @docker/actions-toolkit from 0.38.0 to 0.39.0
2024-09-30 11:50:59 +02:00
CrazyMax
49b5ea61c6
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-09-30 11:40:00 +02:00
dependabot[bot]
13c9fddd72
chore(deps): Bump @docker/actions-toolkit from 0.38.0 to 0.39.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.38.0 to 0.39.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 09:34:56 +00:00
CrazyMax
e44afff359
Merge pull request #1232 from docker/dependabot/npm_and_yarn/path-to-regexp-6.3.0
chore(deps): Bump path-to-regexp from 6.2.2 to 6.3.0
2024-09-27 14:21:12 +02:00
dependabot[bot]
67ebad331f
chore(deps): Bump path-to-regexp from 6.2.2 to 6.3.0
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v6.2.2...v6.3.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 11:38:59 +00:00
CrazyMax
32945a3392
Merge pull request #1230 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.38.0
chore(deps): Bump @docker/actions-toolkit from 0.37.1 to 0.38.0
2024-09-27 13:36:58 +02:00
CrazyMax
e0fe9cf0f2
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-09-27 13:34:05 +02:00
dependabot[bot]
8f1ff6bf9a
chore(deps): Bump @docker/actions-toolkit from 0.37.1 to 0.38.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.37.1 to 0.38.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.37.1...v0.38.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 10:57:29 +00:00
CrazyMax
5cd11c3a4c
Merge pull request #1211 from crazy-max/summary-info-message
print info message for build summary support checks
2024-08-13 12:33:34 +02:00
CrazyMax
0aba704831
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-13 11:18:29 +02:00
CrazyMax
23c657a01f
print info message for build summary support checks
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-13 11:05:41 +02:00
CrazyMax
16ebe778df
Merge pull request #1205 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.37.1
chore(deps): Bump @docker/actions-toolkit from 0.37.0 to 0.37.1
2024-08-07 22:17:02 +02:00
CrazyMax
646a62b4f2
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-07 22:13:02 +02:00
dependabot[bot]
d92ab1347f
chore(deps): Bump @docker/actions-toolkit from 0.37.0 to 0.37.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.37.0 to 0.37.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.37.0...v0.37.1)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 20:11:38 +00:00
CrazyMax
4f7cdeb0f0
Merge pull request #1198 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.37.0
chore(deps): Bump @docker/actions-toolkit from 0.36.0 to 0.37.0
2024-08-07 10:02:48 +02:00
CrazyMax
ad3cd774a4
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-08-07 09:52:34 +02:00
dependabot[bot]
3efbc13366
chore(deps): Bump @docker/actions-toolkit from 0.36.0 to 0.37.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 07:50:48 +00:00
CrazyMax
2dbe91db48
Merge pull request #1197 from crazy-max/build-checks
generate GitHub annotations for build checks
2024-08-06 17:08:37 +02:00
CrazyMax
7de3854c4c
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-31 14:16:51 +02:00
CrazyMax
175aa53a3f
opt to disable github annotations generation for build checks
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-31 14:01:00 +02:00
CrazyMax
806a2a461f
generate GitHub annotations for build checks
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-30 17:57:28 +02:00
CrazyMax
a8d35412fb
Merge pull request #1196 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.36.0
chore(deps): Bump @docker/actions-toolkit from 0.35.0 to 0.36.0
2024-07-30 16:33:04 +02:00
CrazyMax
1672e74297
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-30 16:24:19 +02:00
dependabot[bot]
a04f51d3b4
chore(deps): Bump @docker/actions-toolkit from 0.35.0 to 0.36.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.35.0 to 0.36.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.35.0...v0.36.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 14:12:41 +00:00
CrazyMax
5176d81f87
Merge pull request #1191 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.35.0
chore(deps): Bump @docker/actions-toolkit from 0.34.0 to 0.35.0
2024-07-22 11:57:03 +02:00
CrazyMax
ec10ae8f96
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-22 11:54:59 +02:00
dependabot[bot]
597e8fc414
chore(deps): Bump @docker/actions-toolkit from 0.34.0 to 0.35.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.34.0 to 0.35.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 09:44:56 +00:00
CrazyMax
e050dfa622
Merge pull request #1186 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.34.0
chore(deps): Bump @docker/actions-toolkit from 0.33.0 to 0.34.0
2024-07-19 13:10:25 +02:00
CrazyMax
d1fcdb6ee0
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-18 16:55:34 +02:00
dependabot[bot]
a6067b9a1a
chore(deps): Bump @docker/actions-toolkit from 0.33.0 to 0.34.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-18 11:36:14 +00:00
CrazyMax
1ca370b3a9
Merge pull request #1183 from crazy-max/revert-gha-cache-to
revert "set repository and ghtoken attributes for gha cache type"
2024-07-17 11:01:30 +02:00
CrazyMax
2c95ebed5c
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-17 10:48:34 +02:00
CrazyMax
d189d0ef33
Revert "set repository and ghtoken attributes for gha cache type"
This reverts commit 522345f555207803568057b1b01d3120964b92e2.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-17 10:47:38 +02:00
CrazyMax
a254f8ca60
Merge pull request #1179 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.33.0
chore(deps): Bump @docker/actions-toolkit from 0.31.0 to 0.33.0
2024-07-15 13:54:32 +02:00
CrazyMax
94dae62c78
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-15 13:51:58 +02:00
dependabot[bot]
267a69d6cc
chore(deps): Bump @docker/actions-toolkit from 0.31.0 to 0.33.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.31.0 to 0.33.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.31.0...v0.33.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 11:50:08 +00:00
CrazyMax
f23fb2a7cb
Merge pull request #1133 from crazy-max/gha-cache-to
set repository and ghtoken attributes for gha cache type
2024-07-15 13:47:10 +02:00
CrazyMax
ef76d100ee
chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-03 10:03:37 +02:00
CrazyMax
522345f555
set repository and ghtoken attributes for gha cache type
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-03 10:02:24 +02:00
14 changed files with 270 additions and 119 deletions

View File

@ -288,7 +288,6 @@ jobs:
-
name: Check
run: |
echo "${{ toJson(steps.docker_build) }}"
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
@ -324,7 +323,6 @@ jobs:
-
name: Check
run: |
echo "${{ toJson(steps.docker_build) }}"
if [ "${{ steps.docker_build.outcome }}" != "failure" ] || [ "${{ steps.docker_build.conclusion }}" != "success" ]; then
echo "::error::Should have failed"
exit 1
@ -1463,3 +1461,81 @@ jobs:
file: ./test/Dockerfile
env:
DOCKER_BUILD_RECORD_RETENTION_DAYS: ${{ matrix.days }}
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
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
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

21
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Publish
uses: actions/publish-immutable-action@v0.0.4

View File

@ -25,7 +25,7 @@ jobs:
targets: test
-
name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: ./coverage/clover.xml
files: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}

View File

@ -60,18 +60,18 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
@ -132,18 +132,18 @@ jobs:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
@ -220,6 +220,7 @@ The following inputs can be used as `step.with` keys:
| `build-contexts` | List | List of additional [build contexts](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-context) (e.g., `name=path`) |
| `cache-from` | List | List of [external cache sources](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-from) (e.g., `type=local,src=path/to/dir`) |
| `cache-to` | List | List of [cache export destinations](https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-to) (e.g., `type=local,dest=path/to/dir`) |
| `call` | String | Set [method for evaluating build](https://docs.docker.com/reference/cli/docker/buildx/build/#call) (e.g., `check`) |
| `cgroup-parent` | String | Optional [parent cgroup](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) for the container used in the build |
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
@ -258,6 +259,7 @@ The following outputs are available:
| Name | Type | Default | Description |
|--------------------------------------|--------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `DOCKER_BUILD_CHECKS_ANNOTATIONS` | Bool | `true` | If `false`, GitHub annotations are not generated for [build checks](https://docs.docker.com/build/checks/) |
| `DOCKER_BUILD_SUMMARY` | Bool | `true` | If `false`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
| `DOCKER_BUILD_RECORD_UPLOAD` | Bool | `true` | If `false`, build record upload as [GitHub artifact](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) is disabled |
| `DOCKER_BUILD_RECORD_RETENTION_DAYS` | Number | | Duration after which build record artifact will expire in days. Defaults to repository/org [retention settings](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy) if unset or `0` |

View File

@ -4,7 +4,6 @@
* [BuildKit container logs](#buildkit-container-logs)
* [With containerd](#with-containerd)
* [`repository name must be lowercase`](#repository-name-must-be-lowercase)
* [Image not loaded](#image-not-loaded)
## Cannot push to a registry
@ -136,29 +135,3 @@ Or a dedicated step to sanitize the slug:
push: true
tags: ${{ steps.repo_slug.outputs.result }}:latest
```
## Image not loaded
Sometimes when your workflows are heavy consumers of disk storage, it can happen that build-push-action declares that the built image is loaded, but then not found in the following workflow steps.
- You can use the following solution as workaround, to free space on disk before building docker image using the following workflow step
```yaml
# Free disk space
- name: Free Disk space
shell: bash
run: |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
```
- Another workaround can be to call `docker/setup-buildx-action` with docker driver
```yaml
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
```
More details in the [related issue](https://github.com/docker/build-push-action/issues/321)

View File

@ -34,6 +34,9 @@ inputs:
cache-to:
description: "List of cache export destinations for buildx (e.g., user/app:cache, type=local,dest=path/to/dir)"
required: false
call:
description: "Set method for evaluating build (e.g., check)"
required: false
cgroup-parent:
description: "Optional parent cgroup for the container used in the build"
required: false

30
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -26,8 +26,8 @@
"license": "Apache-2.0",
"packageManager": "yarn@3.6.3",
"dependencies": {
"@actions/core": "^1.10.1",
"@docker/actions-toolkit": "0.31.0",
"@actions/core": "^1.11.1",
"@docker/actions-toolkit": "0.46.0",
"handlebars": "^4.7.7"
},
"devDependencies": {

View File

@ -17,6 +17,7 @@ export interface Inputs {
builder: string;
'cache-from': string[];
'cache-to': string[];
call: string;
'cgroup-parent': string;
context: string;
file: string;
@ -53,6 +54,7 @@ export async function getInputs(): Promise<Inputs> {
builder: core.getInput('builder'),
'cache-from': Util.getInputList('cache-from', {ignoreComma: true}),
'cache-to': Util.getInputList('cache-to', {ignoreComma: true}),
call: core.getInput('call'),
'cgroup-parent': core.getInput('cgroup-parent'),
context: core.getInput('context') || Context.gitContext(),
file: core.getInput('file'),
@ -115,9 +117,9 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
await Util.asyncForEach(inputs['add-hosts'], async addHost => {
args.push('--add-host', addHost);
});
if (inputs.allow.length > 0) {
args.push('--allow', inputs.allow.join(','));
}
await Util.asyncForEach(inputs.allow, async allow => {
args.push('--allow', allow);
});
if (await toolkit.buildx.versionSatisfies('>=0.12.0')) {
await Util.asyncForEach(inputs.annotations, async annotation => {
args.push('--annotation', annotation);
@ -141,6 +143,12 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
await Util.asyncForEach(inputs['cache-to'], async cacheTo => {
args.push('--cache-to', cacheTo);
});
if (inputs.call) {
if (!(await toolkit.buildx.versionSatisfies('>=0.15.0'))) {
throw new Error(`Buildx >= 0.15.0 is required to use the call flag.`);
}
args.push('--call', inputs.call);
}
if (inputs['cgroup-parent']) {
args.push('--cgroup-parent', inputs['cgroup-parent']);
}

View File

@ -97,16 +97,27 @@ actionsToolkit.run(
let err: Error | undefined;
await Exec.getExecOutput(buildCmd.command, buildCmd.args, {
ignoreReturnCode: true
ignoreReturnCode: true,
env: Object.assign({}, process.env, {
BUILDX_METADATA_WARNINGS: 'true'
}) as {
[key: string]: string;
}
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
if (res.exitCode != 0) {
if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
// checks warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
// take the first line with the message summaryzing the warnings
err = Error(res.stdout.split('\n')[0]?.trim());
} else if (res.stderr.length > 0) {
err = Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
}
}
});
const imageID = toolkit.buildxBuild.resolveImageID();
const metadata = toolkit.buildxBuild.resolveMetadata();
const digest = toolkit.buildxBuild.resolveDigest();
const digest = toolkit.buildxBuild.resolveDigest(metadata);
if (imageID) {
await core.group(`ImageID`, async () => {
core.info(imageID);
@ -127,7 +138,7 @@ actionsToolkit.run(
});
}
let ref: string;
let ref: string | undefined;
await core.group(`Reference`, async () => {
ref = await buildRef(toolkit, startedTime, inputs.builder);
if (ref) {
@ -138,17 +149,34 @@ actionsToolkit.run(
}
});
if (buildChecksAnnotationsEnabled()) {
const warnings = toolkit.buildxBuild.resolveWarnings(metadata);
if (ref && warnings && warnings.length > 0) {
const annotations = await Buildx.convertWarningsToGitHubAnnotations(warnings, [ref]);
core.debug(`annotations: ${JSON.stringify(annotations, null, 2)}`);
if (annotations && annotations.length > 0) {
await core.group(`Generating GitHub annotations (${annotations.length} build checks found)`, async () => {
for (const annotation of annotations) {
core.warning(annotation.message, annotation);
}
});
}
}
}
await core.group(`Check build summary support`, async () => {
if (!buildSummaryEnabled()) {
core.info('Build summary disabled');
} else if (inputs.call && inputs.call !== 'build') {
core.info(`Build summary skipped for ${inputs.call} subrequest`);
} else if (GitHub.isGHES) {
core.warning('Build summary is not yet supported on GHES');
core.info('Build summary is not yet supported on GHES');
} else if (!(await toolkit.buildx.versionSatisfies('>=0.13.0'))) {
core.warning('Build summary requires Buildx >= 0.13.0');
core.info('Build summary requires Buildx >= 0.13.0');
} else if (builder && builder.driver === 'cloud') {
core.warning('Build summary is not yet supported with Docker Build Cloud');
core.info('Build summary is not yet supported with Docker Build Cloud');
} else if (!ref) {
core.warning('Build summary requires a build reference');
core.info('Build summary requires a build reference');
} else {
core.info('Build summary supported!');
stateHelper.setSummarySupported();
@ -222,6 +250,13 @@ async function buildRef(toolkit: Toolkit, since: Date, builder?: string): Promis
return Object.keys(refs).length > 0 ? Object.keys(refs)[0] : '';
}
function buildChecksAnnotationsEnabled(): boolean {
if (process.env.DOCKER_BUILD_CHECKS_ANNOTATIONS) {
return Util.parseBool(process.env.DOCKER_BUILD_CHECKS_ANNOTATIONS);
}
return true;
}
function buildSummaryEnabled(): boolean {
if (process.env.DOCKER_BUILD_NO_SUMMARY) {
core.warning('DOCKER_BUILD_NO_SUMMARY is deprecated. Set DOCKER_BUILD_SUMMARY to false instead.');

12
test/lint.Dockerfile Normal file
View File

@ -0,0 +1,12 @@
frOM busybox as base
cOpy lint.Dockerfile .
from scratch
MAINTAINER moby@example.com
COPy --from=base \
/lint.Dockerfile \
/
CMD [ "echo", "Hello, Norway!" ]
CMD [ "echo", "Hello, Sweden!" ]
ENTRYPOINT my-program start

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:alpine AS build
FROM --platform=$BUILDPLATFORM alpine AS build
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
@ -12,7 +13,7 @@ RUN apk --update --no-cache add \
&& rm -rf /tmp/* /var/cache/apk/*
USER buildx
RUN sudo chown buildx. /log
RUN sudo chown buildx: /log
USER root
FROM alpine

108
yarn.lock
View File

@ -12,9 +12,9 @@ __metadata:
languageName: node
linkType: hard
"@actions/artifact@npm:^2.1.7":
version: 2.1.7
resolution: "@actions/artifact@npm:2.1.7"
"@actions/artifact@npm:^2.1.11":
version: 2.1.11
resolution: "@actions/artifact@npm:2.1.11"
dependencies:
"@actions/core": ^1.10.0
"@actions/github": ^5.1.1
@ -26,19 +26,18 @@ __metadata:
"@octokit/request-error": ^5.0.0
"@protobuf-ts/plugin": ^2.2.3-alpha.1
archiver: ^7.0.1
crypto: ^1.0.1
jwt-decode: ^3.1.2
twirp-ts: ^2.5.0
unzip-stream: ^0.3.1
checksum: 346c7caf43bdeb4a96c044ca3a6a005d82b977178b1a6be2c6954dfd59fef3344d2576bdd07c6cac9b54207cc88d7b1161cabd08c7cc15a1db86bf82463b36c7
checksum: dbdafaad11cc573768a00f6b8a7f5109f587eb9461564ae8f15ea8fd1d6a719041df45a92ec204a43a8a1e7ce2c21d8e4229543579b89a3ca8ea30dedddf2fc9
languageName: node
linkType: hard
"@actions/cache@npm:^3.2.4":
version: 3.2.4
resolution: "@actions/cache@npm:3.2.4"
"@actions/cache@npm:^3.3.0":
version: 3.3.0
resolution: "@actions/cache@npm:3.3.0"
dependencies:
"@actions/core": ^1.10.0
"@actions/core": ^1.11.1
"@actions/exec": ^1.0.1
"@actions/glob": ^0.1.0
"@actions/http-client": ^2.1.1
@ -47,12 +46,11 @@ __metadata:
"@azure/ms-rest-js": ^2.6.0
"@azure/storage-blob": ^12.13.0
semver: ^6.3.1
uuid: ^3.3.3
checksum: 5bf5f7541bea4906b553440a9ffee5699e11dfb729365c6cb0bbd37e147a1a0993369fdad16bfa3e2b01ec7fa57dac66276278bfd4a389009246a75ea953e61d
checksum: f0761b1491b7706a80b44d68ed52eb48c04653fc939525a7c7b606e9d9251c40c7e4ac20846ab92ac32db6869e1a6f0f574bd6b7fec1ab9378c8e199c5acc9c9
languageName: node
linkType: hard
"@actions/core@npm:^1.10.0, @actions/core@npm:^1.10.1, @actions/core@npm:^1.2.6":
"@actions/core@npm:^1.10.0, @actions/core@npm:^1.2.6":
version: 1.10.1
resolution: "@actions/core@npm:1.10.1"
dependencies:
@ -62,6 +60,16 @@ __metadata:
languageName: node
linkType: hard
"@actions/core@npm:^1.11.1":
version: 1.11.1
resolution: "@actions/core@npm:1.11.1"
dependencies:
"@actions/exec": ^1.1.1
"@actions/http-client": ^2.0.1
checksum: 9ac7a3e0b478bfefd862dcb4ddaa1d8c3f9076bb1931d3d280918d1749e7783480c6a009c1b009c8bf5093e2d77d9f4e023d70416145bf246f0071736d4ef839
languageName: node
linkType: hard
"@actions/exec@npm:^1.0.0, @actions/exec@npm:^1.0.1, @actions/exec@npm:^1.1.1":
version: 1.1.1
resolution: "@actions/exec@npm:1.1.1"
@ -105,7 +113,7 @@ __metadata:
languageName: node
linkType: hard
"@actions/http-client@npm:^2.0.1, @actions/http-client@npm:^2.1.0, @actions/http-client@npm:^2.1.1, @actions/http-client@npm:^2.2.0, @actions/http-client@npm:^2.2.1":
"@actions/http-client@npm:^2.0.1, @actions/http-client@npm:^2.1.0, @actions/http-client@npm:^2.1.1, @actions/http-client@npm:^2.2.0":
version: 2.2.1
resolution: "@actions/http-client@npm:2.2.1"
dependencies:
@ -115,6 +123,16 @@ __metadata:
languageName: node
linkType: hard
"@actions/http-client@npm:^2.2.3":
version: 2.2.3
resolution: "@actions/http-client@npm:2.2.3"
dependencies:
tunnel: ^0.0.6
undici: ^5.25.4
checksum: 5d395df575d30ae599efa10dd715e72944b015e753db61f0a823f737acbb0e99743d4a9f25e812b18ec8cc34f86c73565d075c449e01ffa891577b6595212dde
languageName: node
linkType: hard
"@actions/io@npm:^1.0.1, @actions/io@npm:^1.1.1, @actions/io@npm:^1.1.3":
version: 1.1.3
resolution: "@actions/io@npm:1.1.3"
@ -1055,32 +1073,32 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:0.31.0":
version: 0.31.0
resolution: "@docker/actions-toolkit@npm:0.31.0"
"@docker/actions-toolkit@npm:0.46.0":
version: 0.46.0
resolution: "@docker/actions-toolkit@npm:0.46.0"
dependencies:
"@actions/artifact": ^2.1.7
"@actions/cache": ^3.2.4
"@actions/core": ^1.10.1
"@actions/artifact": ^2.1.11
"@actions/cache": ^3.3.0
"@actions/core": ^1.11.1
"@actions/exec": ^1.1.1
"@actions/github": ^6.0.0
"@actions/http-client": ^2.2.1
"@actions/http-client": ^2.2.3
"@actions/io": ^1.1.3
"@actions/tool-cache": ^2.0.1
"@azure/storage-blob": ^12.15.0
"@octokit/core": ^5.1.0
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
async-retry: ^1.3.3
csv-parse: ^5.5.6
csv-parse: ^5.6.0
gunzip-maybe: ^1.4.2
handlebars: ^4.7.8
he: ^1.2.0
js-yaml: ^4.1.0
jwt-decode: ^4.0.0
semver: ^7.6.2
semver: ^7.6.3
tar-stream: ^3.1.7
tmp: ^0.2.3
checksum: 34fdc08b6380bbee05fc740b161bb1172658da6d3e58f0f9cf8bc12011da638b37314e2a92a689542955189459ace241769c9f247a6917bf8365bc461221eecd
checksum: cd34682d1b801c17c81f7f6791c4c81a69018f02413a1f7a7c2c1086bf0ee98c9afb5b44e6d5b8827df188819913eec47fa5b54b63f522b4a87c216de0b5725f
languageName: node
linkType: hard
@ -3015,27 +3033,20 @@ __metadata:
linkType: hard
"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
version: 7.0.6
resolution: "cross-spawn@npm:7.0.6"
dependencies:
path-key: ^3.1.0
shebang-command: ^2.0.0
which: ^2.0.1
checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52
checksum: 8d306efacaf6f3f60e0224c287664093fa9185680b2d195852ba9a863f85d02dcc737094c6e512175f8ee0161f9b87c73c6826034c2422e39de7d6569cf4503b
languageName: node
linkType: hard
"crypto@npm:^1.0.1":
version: 1.0.1
resolution: "crypto@npm:1.0.1"
checksum: 087fe3165bd94c333a49e6ed66a0193911f63eac38a24f379b3001a5fe260a59c413646e53a0f67875ba13902b2686d81dc703cb2c147a4ec727dcdc04e5645e
languageName: node
linkType: hard
"csv-parse@npm:^5.5.6":
version: 5.5.6
resolution: "csv-parse@npm:5.5.6"
checksum: ee06f97f674487dc1d001b360de8ea510a41b9d971abf43bcf9c3be22c83a3634df0d3ebfbe52fd49d145077066be7ff9f25de3fc6b71aefb973099b04147a25
"csv-parse@npm:^5.6.0":
version: 5.6.0
resolution: "csv-parse@npm:5.6.0"
checksum: 173e176bdaf212bab37d0f6d39a06d039d24a1c0ee40b9f1023ebf8b36095934807deeb493c0fb58592b39b0682ccd0be5c9e8d2b137c08807e7031595ea7a51
languageName: node
linkType: hard
@ -3149,8 +3160,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "docker-build-push@workspace:."
dependencies:
"@actions/core": ^1.10.1
"@docker/actions-toolkit": 0.31.0
"@actions/core": ^1.11.1
"@docker/actions-toolkit": 0.46.0
"@types/node": ^20.12.12
"@typescript-eslint/eslint-plugin": ^7.9.0
"@typescript-eslint/parser": ^7.9.0
@ -5502,9 +5513,9 @@ __metadata:
linkType: hard
"path-to-regexp@npm:^6.2.0":
version: 6.2.2
resolution: "path-to-regexp@npm:6.2.2"
checksum: b7b0005c36f5099f9ed1fb20a820d2e4ed1297ffe683ea1d678f5e976eb9544f01debb281369dabdc26da82e6453901bf71acf2c7ed14b9243536c2a45286c33
version: 6.3.0
resolution: "path-to-regexp@npm:6.3.0"
checksum: eca78602e6434a1b6799d511d375ec044e8d7e28f5a48aa5c28d57d8152fb52f3fc62fb1cfc5dfa2198e1f041c2a82ed14043d75740a2fe60e91b5089a153250
languageName: node
linkType: hard
@ -5894,7 +5905,7 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:^7.6.0, semver@npm:^7.6.2":
"semver@npm:^7.6.0":
version: 7.6.2
resolution: "semver@npm:7.6.2"
bin:
@ -5903,6 +5914,15 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:^7.6.3":
version: 7.6.3
resolution: "semver@npm:7.6.3"
bin:
semver: bin/semver.js
checksum: 4110ec5d015c9438f322257b1c51fe30276e5f766a3f64c09edd1d7ea7118ecbc3f379f3b69032bacf13116dc7abc4ad8ce0d7e2bd642e26b0d271b56b61a7d8
languageName: node
linkType: hard
"shebang-command@npm:^2.0.0":
version: 2.0.0
resolution: "shebang-command@npm:2.0.0"
@ -6604,7 +6624,7 @@ __metadata:
languageName: node
linkType: hard
"uuid@npm:^3.3.2, uuid@npm:^3.3.3":
"uuid@npm:^3.3.2":
version: 3.4.0
resolution: "uuid@npm:3.4.0"
bin: