mirror of
https://github.com/docker/setup-buildx-action
synced 2026-10-02 19:56:25 +08:00
Compare commits
128
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bee9fde898 | ||
|
|
087c08b37e | ||
|
|
f87e5991a6 | ||
|
|
e7002743e0 | ||
|
|
3061c919c6 | ||
|
|
594f3bf428 | ||
|
|
bd6e702fc3 | ||
|
|
6268c9da9a | ||
|
|
e8235251b8 | ||
|
|
533ed8ed09 | ||
|
|
bedaf13569 | ||
|
|
d5079fba84 | ||
|
|
226a61612a | ||
|
|
77ce7f4bab | ||
|
|
0dc1dc94f0 | ||
|
|
9941930bf6 | ||
|
|
f840b60a5b | ||
|
|
d3c78156b5 | ||
|
|
842fd7aba7 | ||
|
|
91fda88893 | ||
|
|
0e66b76dff | ||
|
|
9e24513fba | ||
|
|
23cd853abe | ||
|
|
510b8b46fc | ||
|
|
df6aa2269a | ||
|
|
7f1cb2b5f6 | ||
|
|
b98bdf1163 | ||
|
|
af189076ae | ||
|
|
b005abb1e0 | ||
|
|
78b0615af3 | ||
|
|
5ac4a31b15 | ||
|
|
7b088f724c | ||
|
|
e38e8a1e29 | ||
|
|
20e2701a77 | ||
|
|
b75cf9098e | ||
|
|
1a2e524850 | ||
|
|
c41f88734b | ||
|
|
38f63b05d6 | ||
|
|
120ea02953 | ||
|
|
d055e6c81b | ||
|
|
077263eb4f | ||
|
|
37fe631027 | ||
|
|
b5c4f91922 | ||
|
|
3e93b637c6 | ||
|
|
e527031b32 | ||
|
|
c68814b33c | ||
|
|
3f891b01bd | ||
|
|
787db26fcd | ||
|
|
f7793687c7 | ||
|
|
7d5e604134 | ||
|
|
292c2fb383 | ||
|
|
165389f45c | ||
|
|
47814788a6 | ||
|
|
8c349abcaa | ||
|
|
92e837c4ed | ||
|
|
63e71bc2eb | ||
|
|
d58876a2d7 | ||
|
|
37b15858d6 | ||
|
|
e9af326dda | ||
|
|
5b9cf3909b | ||
|
|
732ad0c7e0 | ||
|
|
68e9f6c4df | ||
|
|
c7eb3a568d | ||
|
|
ded50b8f6a | ||
|
|
07afd06cce | ||
|
|
cbac286239 | ||
|
|
3b570103fa | ||
|
|
55604bd661 | ||
|
|
be525e565d | ||
|
|
bb05f3f551 | ||
|
|
321c814cb5 | ||
|
|
b9a36ef79b | ||
|
|
ebeab24128 | ||
|
|
5c7b8ae78c | ||
|
|
037e618cd9 | ||
|
|
66080e5802 | ||
|
|
409aef0aa3 | ||
|
|
49c6e42949 | ||
|
|
2211273e81 | ||
|
|
1c203bbd66 | ||
|
|
bdb9e8c4a3 | ||
|
|
a1ef928785 | ||
|
|
2b9ccacd29 | ||
|
|
30f516a36d | ||
|
|
7ed1344edc | ||
|
|
62a375d019 | ||
|
|
911fd9be4b | ||
|
|
425c29b574 | ||
|
|
19a5ebdfd5 | ||
|
|
0727322ec8 | ||
|
|
e929e9255c | ||
|
|
ebf3b1c616 | ||
|
|
07480ddaf5 | ||
|
|
7b0a0dd78a | ||
|
|
a0e446b4dd | ||
|
|
2bc18585f7 | ||
|
|
bf6e25472a | ||
|
|
fbfc14c547 | ||
|
|
49c98a8139 | ||
|
|
03a2247451 | ||
|
|
bed9a68598 | ||
|
|
c6e2526453 | ||
|
|
c887d9748d | ||
|
|
cfdae34ead | ||
|
|
40445d9e77 | ||
|
|
0d5ecf6801 | ||
|
|
86a837e8bd | ||
|
|
22b48a429f | ||
|
|
5858c5d38b | ||
|
|
fa8b94d584 | ||
|
|
76e60acf32 | ||
|
|
716a6ed7ad | ||
|
|
76e58290b2 | ||
|
|
4c56ab6283 | ||
|
|
7d85158e51 | ||
|
|
8508f00982 | ||
|
|
b0c3aa1759 | ||
|
|
25434de062 | ||
|
|
a7757fd670 | ||
|
|
e7950c2a5e | ||
|
|
7fafe247d6 | ||
|
|
cffcaa17d0 | ||
|
|
9099559035 | ||
|
|
0772d51c0d | ||
|
|
8b5bc381e6 | ||
|
|
e43e67c8fb | ||
|
|
61caaf58f9 | ||
|
|
a7ea3685d3 |
@@ -10,6 +10,9 @@ updates:
|
||||
crazy-max-dot-github:
|
||||
patterns:
|
||||
- "crazy-max/.github/*"
|
||||
codeql-actions:
|
||||
patterns:
|
||||
- "github/codeql-action/*"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "bot"
|
||||
|
||||
+53
-36
@@ -35,7 +35,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx 1
|
||||
uses: ./
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Stop docker
|
||||
run: |
|
||||
@@ -88,14 +88,14 @@ jobs:
|
||||
-
|
||||
name: Dump context
|
||||
if: always()
|
||||
uses: crazy-max/ghaction-dump-context@5d2753e7076f4568c7729971e25231f32147e2d8 # v3.0.0
|
||||
uses: crazy-max/ghaction-dump-context@4d9eeaf15dd59aa4346919ea84a84ccf514b4db8 # v3.1.0
|
||||
|
||||
debug:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Create Dockerfile
|
||||
run: |
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
EOL
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||
uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -113,7 +113,7 @@ jobs:
|
||||
buildkitd-flags: --debug
|
||||
-
|
||||
name: Build
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
||||
@@ -129,7 +129,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -165,7 +165,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -182,6 +182,15 @@ jobs:
|
||||
|
||||
endpoint:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
endpoint:
|
||||
- mycontext
|
||||
- tcp://127.0.0.1:2375
|
||||
env:
|
||||
# only the explicit endpoint should provide access to a daemon.
|
||||
DOCKER_HOST: unix:///tmp/nonexistent-docker.sock
|
||||
services:
|
||||
dind:
|
||||
image: docker:29.3-dind@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
||||
@@ -198,7 +207,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Create context
|
||||
run: |
|
||||
@@ -209,18 +218,26 @@ jobs:
|
||||
docker --context mycontext info
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: ./
|
||||
with:
|
||||
endpoint: mycontext
|
||||
endpoint: ${{ matrix.endpoint }}
|
||||
-
|
||||
name: Build
|
||||
env:
|
||||
DOCKER_CONTEXT: mycontext
|
||||
BUILDER: ${{ steps.buildx.outputs.name }}
|
||||
run: |
|
||||
docker buildx build --builder "$BUILDER" - <<'EOF'
|
||||
FROM scratch
|
||||
LABEL test=endpoint
|
||||
EOF
|
||||
|
||||
buildkitd-config:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Create buildkitd conf
|
||||
run: |
|
||||
@@ -243,7 +260,7 @@ jobs:
|
||||
buildkitd-config: /tmp/buildkitd.toml
|
||||
-
|
||||
name: Build
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
|
||||
@@ -252,7 +269,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Create Dockerfile
|
||||
run: |
|
||||
@@ -270,7 +287,7 @@ jobs:
|
||||
mirrors = ["mirror.gcr.io"]
|
||||
-
|
||||
name: Build
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
|
||||
@@ -288,10 +305,10 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||
uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
|
||||
with:
|
||||
platforms: ${{ matrix.qemu-platforms }}
|
||||
-
|
||||
@@ -317,7 +334,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -331,7 +348,7 @@ jobs:
|
||||
EOL
|
||||
-
|
||||
name: Build
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
|
||||
@@ -340,7 +357,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Uninstall docker cli
|
||||
run: |
|
||||
@@ -368,7 +385,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Uninstall docker cli
|
||||
run: |
|
||||
@@ -390,7 +407,7 @@ jobs:
|
||||
EOL
|
||||
-
|
||||
name: Build
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
|
||||
@@ -399,7 +416,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Create dummy contexts
|
||||
run: |
|
||||
@@ -428,10 +445,10 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||
uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -443,7 +460,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Create Docker context
|
||||
run: |
|
||||
@@ -466,7 +483,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -485,10 +502,10 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Install k3s
|
||||
uses: crazy-max/.github/.github/actions/install-k3s@9ba6e6f9450baf3b1237f8035c1fdc45932510bd # v1.8.0
|
||||
uses: crazy-max/.github/.github/actions/install-k3s@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
@@ -518,7 +535,7 @@ jobs:
|
||||
EOL
|
||||
-
|
||||
name: Build
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
||||
with:
|
||||
context: .
|
||||
|
||||
@@ -533,7 +550,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -546,7 +563,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
@@ -567,7 +584,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
@@ -586,7 +603,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Enable corepack
|
||||
run: |
|
||||
@@ -30,17 +30,17 @@ jobs:
|
||||
yarn --version
|
||||
-
|
||||
name: Set up Node
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
-
|
||||
name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
||||
uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
|
||||
with:
|
||||
languages: javascript-typescript
|
||||
build-mode: none
|
||||
-
|
||||
name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
||||
uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
|
||||
with:
|
||||
category: "/language:javascript-typescript"
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
|
||||
jobs:
|
||||
run:
|
||||
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@9ba6e6f9450baf3b1237f8035c1fdc45932510bd # v1.8.0
|
||||
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Publish
|
||||
uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4
|
||||
|
||||
@@ -20,19 +20,19 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: ./
|
||||
-
|
||||
name: Test
|
||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
||||
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||
with:
|
||||
source: .
|
||||
targets: test
|
||||
-
|
||||
name: Upload coverage
|
||||
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
with:
|
||||
files: ./coverage/clover.xml
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
@@ -30,14 +30,14 @@ jobs:
|
||||
permission-contents: write
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.docker-read-app.outputs.token }}
|
||||
-
|
||||
name: Build
|
||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
||||
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||
with:
|
||||
source: .
|
||||
targets: build
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add dist
|
||||
git commit -m "chore: update generated content"
|
||||
git commit -m "[dependabot skip] chore: update generated content"
|
||||
git push
|
||||
)
|
||||
else
|
||||
|
||||
@@ -22,11 +22,11 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
-
|
||||
name: Generate matrix
|
||||
id: generate
|
||||
uses: docker/bake-action/subaction/matrix@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
||||
uses: docker/bake-action/subaction/matrix@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||
with:
|
||||
target: validate
|
||||
|
||||
@@ -41,6 +41,6 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Validate
|
||||
uses: docker/bake-action@a66e1c87e2eca0503c343edf1d208c716d54b8a8 # v7.1.0
|
||||
uses: docker/bake-action@d3418bd7d0e9324001bca92fa8ba175ea7e6dc9b # v7.3.0
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
@@ -19,7 +19,7 @@ on:
|
||||
|
||||
jobs:
|
||||
zizmor:
|
||||
uses: crazy-max/.github/.github/workflows/zizmor.yml@9ba6e6f9450baf3b1237f8035c1fdc45932510bd # v1.8.0
|
||||
uses: crazy-max/.github/.github/workflows/zizmor.yml@f91220cba053bd54299ba645a599ee8ed436f222 # v1.11.0
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
+11
-4
@@ -1,10 +1,10 @@
|
||||
# https://yarnpkg.com/configuration/yarnrc
|
||||
|
||||
compressionLevel: mixed
|
||||
enableGlobalCache: false
|
||||
enableHardenedMode: true
|
||||
nodeLinker: node-modules
|
||||
|
||||
logFilters:
|
||||
- code: YN0004
|
||||
level: discard
|
||||
- code: YN0013
|
||||
level: discard
|
||||
- code: YN0019
|
||||
@@ -14,4 +14,11 @@ logFilters:
|
||||
- code: YN0086
|
||||
level: discard
|
||||
|
||||
nodeLinker: node-modules
|
||||
npmPreapprovedPackages:
|
||||
- "@docker/actions-toolkit"
|
||||
|
||||
compressionLevel: mixed
|
||||
enableGlobalCache: false
|
||||
enableHardenedMode: true
|
||||
enableScripts: false
|
||||
npmMinimalAgeGate: 2d
|
||||
|
||||
+20
-135
@@ -234,7 +234,7 @@ describe('getCreateArgs', () => {
|
||||
],
|
||||
[
|
||||
10,
|
||||
'v0.10.3',
|
||||
'v0.37.0',
|
||||
new Map<string, string>([
|
||||
['use', 'false'],
|
||||
['driver', 'cloud'],
|
||||
@@ -301,6 +301,25 @@ describe('getCreateArgs', () => {
|
||||
expect(res).toEqual(expected);
|
||||
}
|
||||
);
|
||||
|
||||
test('rejects cloud driver with unsupported official Buildx', async () => {
|
||||
setInput('version', 'v0.36.1');
|
||||
setInput('driver', 'cloud');
|
||||
setInput('use', 'true');
|
||||
setInput('cache-binary', 'true');
|
||||
setInput('cleanup', 'true');
|
||||
setInput('keep-state', 'false');
|
||||
const toolkit = new Toolkit();
|
||||
const versionSpy = vi.spyOn(Buildx.prototype, 'version').mockImplementation(async (): Promise<string> => {
|
||||
return 'v0.36.1';
|
||||
});
|
||||
try {
|
||||
const inp = await context.getInputs();
|
||||
await expect(context.getCreateArgs(inp, toolkit)).rejects.toThrow(/requires Buildx v0.37.0 or later/);
|
||||
} finally {
|
||||
versionSpy.mockRestore();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('getAppendArgs', () => {
|
||||
@@ -361,140 +380,6 @@ describe('getAppendArgs', () => {
|
||||
);
|
||||
});
|
||||
|
||||
describe('getVersion', () => {
|
||||
beforeEach(() => {
|
||||
process.env = Object.keys(process.env).reduce((object, key) => {
|
||||
if (!key.startsWith('INPUT_')) {
|
||||
object[key] = process.env[key];
|
||||
}
|
||||
return object;
|
||||
}, {});
|
||||
});
|
||||
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
[
|
||||
0,
|
||||
new Map<string, string>([
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
''
|
||||
],
|
||||
[
|
||||
1,
|
||||
new Map<string, string>([
|
||||
['version', 'latest'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'latest'
|
||||
],
|
||||
[
|
||||
2,
|
||||
new Map<string, string>([
|
||||
['version', 'edge'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'edge'
|
||||
],
|
||||
[
|
||||
3,
|
||||
new Map<string, string>([
|
||||
['version', 'v0.19.2'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'v0.19.2'
|
||||
],
|
||||
[
|
||||
4,
|
||||
new Map<string, string>([
|
||||
['version', 'latest'],
|
||||
['driver', 'cloud'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'cloud:latest'
|
||||
],
|
||||
[
|
||||
5,
|
||||
new Map<string, string>([
|
||||
['version', 'edge'],
|
||||
['driver', 'cloud'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'cloud:edge'
|
||||
],
|
||||
[
|
||||
6,
|
||||
new Map<string, string>([
|
||||
['driver', 'cloud'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'cloud:latest'
|
||||
],
|
||||
[
|
||||
7,
|
||||
new Map<string, string>([
|
||||
['version', 'cloud:v0.11.2-desktop.2'],
|
||||
['driver', 'cloud'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'cloud:v0.11.2-desktop.2'
|
||||
],
|
||||
[
|
||||
8,
|
||||
new Map<string, string>([
|
||||
['version', 'cloud:v0.11.2-desktop.2'],
|
||||
// defaults
|
||||
['use', 'true'],
|
||||
['cache-binary', 'true'],
|
||||
['cleanup', 'true'],
|
||||
['keep-state', 'false']
|
||||
]),
|
||||
'cloud:v0.11.2-desktop.2'
|
||||
],
|
||||
])(
|
||||
'[%d] given %o as inputs, returns version %o',
|
||||
async (num: number, inputs: Map<string, string>, expected: string) => {
|
||||
inputs.forEach((value: string, name: string) => {
|
||||
setInput(name, value);
|
||||
});
|
||||
const inp = await context.getInputs();
|
||||
expect(context.getVersion(inp)).toEqual(expected);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
|
||||
function getInputName(name: string): string {
|
||||
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ FROM base AS deps
|
||||
RUN --mount=type=bind,target=.,rw \
|
||||
--mount=type=cache,target=/src/.yarn/cache \
|
||||
--mount=type=cache,target=/src/node_modules \
|
||||
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
||||
yarn install --immutable && mkdir /vendor && cp yarn.lock /vendor
|
||||
|
||||
FROM scratch AS vendor-update
|
||||
COPY --from=deps /vendor /
|
||||
|
||||
+142
-215
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+26
-746
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -4,7 +4,7 @@
|
||||
"type": "module",
|
||||
"main": "src/main.ts",
|
||||
"scripts": {
|
||||
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify && yarn run license",
|
||||
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify --keep-names && yarn run license",
|
||||
"lint": "eslint --max-warnings=0 .",
|
||||
"format": "eslint --fix .",
|
||||
"test": "vitest run",
|
||||
@@ -21,11 +21,11 @@
|
||||
],
|
||||
"author": "Docker Inc.",
|
||||
"license": "Apache-2.0",
|
||||
"packageManager": "yarn@4.9.2",
|
||||
"packageManager": "yarn@4.15.0",
|
||||
"dependencies": {
|
||||
"@actions/core": "^3.0.0",
|
||||
"@docker/actions-toolkit": "^0.90.0",
|
||||
"js-yaml": "^4.1.1"
|
||||
"@actions/core": "^3.0.1",
|
||||
"@docker/actions-toolkit": "^0.103.0",
|
||||
"js-yaml": "^5.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.3",
|
||||
|
||||
+3
-14
@@ -52,6 +52,9 @@ export async function getBuilderName(name: string, driver: string): Promise<stri
|
||||
|
||||
export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
|
||||
const args: Array<string> = ['create', '--name', inputs.name, '--driver', inputs.driver];
|
||||
if (inputs.driver === 'cloud' && !inputs.version.startsWith('cloud:') && !inputs.version.startsWith('lab:') && !(await toolkit.buildx.versionSatisfies('>=0.37.0-0'))) {
|
||||
throw new Error(`Docker Build Cloud with official Buildx requires Buildx v0.37.0 or later. Set version to cloud:<version> or lab:<version> to use the legacy Docker Build Cloud release channel.`);
|
||||
}
|
||||
if (await toolkit.buildx.versionSatisfies('>=0.3.0')) {
|
||||
await Util.asyncForEach(inputs.driverOpts, async (driverOpt: string) => {
|
||||
args.push('--driver-opt', driverOpt);
|
||||
@@ -116,17 +119,3 @@ export async function getInspectArgs(inputs: Inputs, toolkit: Toolkit): Promise<
|
||||
function driverSupportsBuildkitdFlags(driver: string): boolean {
|
||||
return driver == '' || driver == 'docker-container' || driver == 'docker' || driver == 'kubernetes';
|
||||
}
|
||||
|
||||
export function getVersion(inputs: Inputs): string {
|
||||
const version = inputs.version;
|
||||
if (inputs.driver === 'cloud') {
|
||||
if (!version || version === 'latest') {
|
||||
return 'cloud:latest';
|
||||
}
|
||||
if (version.startsWith('cloud:') || version.startsWith('lab:')) {
|
||||
return version;
|
||||
}
|
||||
return `cloud:${version}`;
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
+58
-25
@@ -22,7 +22,6 @@ actionsToolkit.run(
|
||||
async () => {
|
||||
const inputs: context.Inputs = await context.getInputs();
|
||||
stateHelper.setCleanup(inputs.cleanup);
|
||||
const version = context.getVersion(inputs);
|
||||
|
||||
const toolkit = new Toolkit();
|
||||
const standalone = await toolkit.buildx.isStandalone();
|
||||
@@ -44,17 +43,17 @@ actionsToolkit.run(
|
||||
});
|
||||
|
||||
let toolPath;
|
||||
if (Util.isValidRef(version)) {
|
||||
if (Util.isValidRef(inputs.version)) {
|
||||
if (standalone) {
|
||||
throw new Error(`Cannot build from source without the Docker CLI`);
|
||||
}
|
||||
await core.group(`Build buildx from source`, async () => {
|
||||
toolPath = await toolkit.buildxInstall.build(version, !inputs.cacheBinary);
|
||||
toolPath = await toolkit.buildxInstall.build(inputs.version, !inputs.cacheBinary);
|
||||
});
|
||||
} else if (!(await toolkit.buildx.isAvailable()) || version) {
|
||||
} else if (!(await toolkit.buildx.isAvailable()) || inputs.version || (inputs.driver === 'cloud' && !inputs.version && !(await toolkit.buildx.versionSatisfies('>=0.37.0-0')))) {
|
||||
await core.group(`Download buildx from GitHub Releases`, async () => {
|
||||
toolPath = await toolkit.buildxInstall.download({
|
||||
version: version || 'latest',
|
||||
version: inputs.version || 'latest',
|
||||
ghaNoCache: !inputs.cacheBinary
|
||||
});
|
||||
});
|
||||
@@ -91,8 +90,8 @@ actionsToolkit.run(
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
core.info(`Cannot inspect default docker context: ${res.stderr.trim()}`);
|
||||
if (res.exitCode != 0) {
|
||||
core.info(`Cannot inspect default docker context: ${Docker.getErrorMessage(res.stderr)}`);
|
||||
} else {
|
||||
try {
|
||||
const contextInfo = (<Array<ContextInfo>>JSON.parse(res.stdout.trim()))[0];
|
||||
@@ -113,8 +112,8 @@ actionsToolkit.run(
|
||||
await Docker.getExecOutput(['context', 'create', tmpDockerContext], {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
core.warning(`Cannot create docker context ${tmpDockerContext}: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
|
||||
if (res.exitCode != 0) {
|
||||
core.warning(`Cannot create docker context ${tmpDockerContext}: ${Docker.getErrorMessage(res.stderr)}`);
|
||||
} else {
|
||||
core.info(`Setting builder endpoint to ${tmpDockerContext} context`);
|
||||
inputs.endpoint = tmpDockerContext;
|
||||
@@ -125,9 +124,35 @@ actionsToolkit.run(
|
||||
}
|
||||
}
|
||||
|
||||
let builderExists = false;
|
||||
if (inputs.driver !== 'docker') {
|
||||
builderExists = await toolkit.builder.exists(inputs.name);
|
||||
}
|
||||
|
||||
const appendNodes = inputs.append ? (yaml.load(inputs.append) as Node[]) : [];
|
||||
|
||||
if (!standalone && inputs.driver == 'docker-container') {
|
||||
const buildkitImages = new Set<string>();
|
||||
if (!builderExists && !inputs.endpoint) {
|
||||
buildkitImages.add(resolveBuildKitImage(inputs.driverOpts));
|
||||
}
|
||||
for (const node of appendNodes) {
|
||||
if (!node.endpoint) {
|
||||
buildkitImages.add(resolveBuildKitImage(node['driver-opts']));
|
||||
}
|
||||
}
|
||||
if (buildkitImages.size > 0) {
|
||||
await core.group(`Pulling BuildKit image(s)`, async () => {
|
||||
for (const image of buildkitImages) {
|
||||
await Docker.pull(image);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (inputs.driver !== 'docker') {
|
||||
await core.group(`Creating a new builder instance`, async () => {
|
||||
if (await toolkit.builder.exists(inputs.name)) {
|
||||
if (builderExists) {
|
||||
core.info(`Builder ${inputs.name} already exists, skipping creation`);
|
||||
} else {
|
||||
const certsDriverOpts = Buildx.resolveCertsDriverOpts(inputs.driver, inputs.endpoint, {
|
||||
@@ -142,19 +167,18 @@ actionsToolkit.run(
|
||||
await Exec.getExecOutput(createCmd.command, createCmd.args, {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
|
||||
if (res.exitCode != 0) {
|
||||
throw new Error(`Failed to create builder ${inputs.name}: ${Buildx.getErrorMessage(res.stderr)}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (inputs.append) {
|
||||
if (appendNodes.length > 0) {
|
||||
await core.group(`Appending node(s) to builder`, async () => {
|
||||
let nodeIndex = 1;
|
||||
const nodes = yaml.load(inputs.append) as Node[];
|
||||
for (const node of nodes) {
|
||||
for (const node of appendNodes) {
|
||||
const certsDriverOpts = Buildx.resolveCertsDriverOpts(inputs.driver, `${node.endpoint}`, {
|
||||
cacert: process.env[`${context.builderNodeEnvPrefix}_${nodeIndex}_AUTH_TLS_CACERT`],
|
||||
cert: process.env[`${context.builderNodeEnvPrefix}_${nodeIndex}_AUTH_TLS_CERT`],
|
||||
@@ -167,8 +191,8 @@ actionsToolkit.run(
|
||||
await Exec.getExecOutput(appendCmd.command, appendCmd.args, {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
throw new Error(`Failed to append node ${node.name}: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
|
||||
if (res.exitCode != 0) {
|
||||
throw new Error(`Failed to append node ${node.name}: ${Buildx.getErrorMessage(res.stderr)}`);
|
||||
}
|
||||
});
|
||||
nodeIndex++;
|
||||
@@ -181,8 +205,8 @@ actionsToolkit.run(
|
||||
await Exec.getExecOutput(inspectCmd.command, inspectCmd.args, {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
throw new Error(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
|
||||
if (res.exitCode != 0) {
|
||||
throw new Error(`Failed to boot builder: ${Buildx.getErrorMessage(res.stderr)}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -226,8 +250,8 @@ actionsToolkit.run(
|
||||
await Docker.getExecOutput(['logs', `${stateHelper.containerName}`], {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
core.warning(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
|
||||
if (res.exitCode != 0) {
|
||||
core.warning(`Failed to display BuildKit logs: ${Docker.getErrorMessage(res.stderr)}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -246,8 +270,8 @@ actionsToolkit.run(
|
||||
await Exec.getExecOutput(rmCmd.command, rmCmd.args, {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
core.warning(res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error');
|
||||
if (res.exitCode != 0) {
|
||||
core.warning(`Failed to remove builder ${stateHelper.builderName}: ${Buildx.getErrorMessage(res.stderr)}`);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -261,8 +285,8 @@ actionsToolkit.run(
|
||||
await Exec.getExecOutput('docker', ['context', 'rm', '-f', stateHelper.tmpDockerContext], {
|
||||
ignoreReturnCode: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
core.warning(`${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
|
||||
if (res.exitCode != 0) {
|
||||
core.warning(`Failed to remove temp docker context ${stateHelper.tmpDockerContext}: ${Docker.getErrorMessage(res.stderr)}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -275,3 +299,12 @@ actionsToolkit.run(
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function resolveBuildKitImage(driverOpts: string[] = []): string {
|
||||
return (
|
||||
driverOpts
|
||||
.find(driverOpt => driverOpt.trim().startsWith('image='))
|
||||
?.trim()
|
||||
.substring('image='.length) || 'moby/buildkit:buildx-stable-1'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user