mirror of
https://github.com/docker/setup-buildx-action
synced 2026-09-16 08:30:26 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f87e5991a6 | ||
|
|
e7002743e0 | ||
|
|
3061c919c6 |
@@ -182,6 +182,15 @@ jobs:
|
|||||||
|
|
||||||
endpoint:
|
endpoint:
|
||||||
runs-on: ubuntu-latest
|
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:
|
services:
|
||||||
dind:
|
dind:
|
||||||
image: docker:29.3-dind@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
image: docker:29.3-dind@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
||||||
@@ -209,11 +218,19 @@ jobs:
|
|||||||
docker --context mycontext info
|
docker --context mycontext info
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
endpoint: mycontext
|
endpoint: ${{ matrix.endpoint }}
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
env:
|
env:
|
||||||
DOCKER_CONTEXT: mycontext
|
BUILDER: ${{ steps.buildx.outputs.name }}
|
||||||
|
run: |
|
||||||
|
docker buildx build --builder "$BUILDER" - <<'EOF'
|
||||||
|
FROM scratch
|
||||||
|
LABEL test=endpoint
|
||||||
|
EOF
|
||||||
|
|
||||||
buildkitd-config:
|
buildkitd-config:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+3
-1
@@ -133,12 +133,14 @@ actionsToolkit.run(
|
|||||||
|
|
||||||
if (!standalone && inputs.driver == 'docker-container') {
|
if (!standalone && inputs.driver == 'docker-container') {
|
||||||
const buildkitImages = new Set<string>();
|
const buildkitImages = new Set<string>();
|
||||||
if (!builderExists) {
|
if (!builderExists && !inputs.endpoint) {
|
||||||
buildkitImages.add(resolveBuildKitImage(inputs.driverOpts));
|
buildkitImages.add(resolveBuildKitImage(inputs.driverOpts));
|
||||||
}
|
}
|
||||||
for (const node of appendNodes) {
|
for (const node of appendNodes) {
|
||||||
|
if (!node.endpoint) {
|
||||||
buildkitImages.add(resolveBuildKitImage(node['driver-opts']));
|
buildkitImages.add(resolveBuildKitImage(node['driver-opts']));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (buildkitImages.size > 0) {
|
if (buildkitImages.size > 0) {
|
||||||
await core.group(`Pulling BuildKit image(s)`, async () => {
|
await core.group(`Pulling BuildKit image(s)`, async () => {
|
||||||
for (const image of buildkitImages) {
|
for (const image of buildkitImages) {
|
||||||
|
|||||||
Reference in New Issue
Block a user