mirror of
https://github.com/docker/setup-buildx-action.git
synced 2024-11-15 17:13:51 +08:00
Merge pull request #219 from crazy-max/ci-k3s-append
set node name for k8s driver when appending nodes
This commit is contained in:
commit
d95759405f
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@ -496,3 +496,53 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
cleanup: ${{ matrix.cleanup }}
|
cleanup: ${{ matrix.cleanup }}
|
||||||
|
|
||||||
|
k3s:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version:
|
||||||
|
- v0.11.0-rc1
|
||||||
|
- v0.10.5
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Install k3s
|
||||||
|
uses: crazy-max/.github/.github/actions/install-k3s@605d30d5ae97f6680578ace4b56645af79343e60
|
||||||
|
with:
|
||||||
|
version: "v1.21.2-k3s1"
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.version }}
|
||||||
|
driver: kubernetes
|
||||||
|
platforms: linux/amd64
|
||||||
|
driver-opts: |
|
||||||
|
image=moby/buildkit:buildx-stable-1
|
||||||
|
qemu.install=true
|
||||||
|
append: |
|
||||||
|
- platforms: linux/arm64
|
||||||
|
driver-opts:
|
||||||
|
- image=moby/buildkit:buildx-stable-1
|
||||||
|
- qemu.install=true
|
||||||
|
- platforms: linux/s390x
|
||||||
|
driver-opts:
|
||||||
|
- image=moby/buildkit:buildx-stable-1
|
||||||
|
- qemu.install=true
|
||||||
|
-
|
||||||
|
name: Create Dockerfile
|
||||||
|
run: |
|
||||||
|
cat > ./Dockerfile <<EOL
|
||||||
|
FROM alpine
|
||||||
|
RUN uname -a
|
||||||
|
EOL
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
uses: docker/build-push-action@master
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -78,6 +78,8 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
|
|||||||
const args: Array<string> = ['create', '--name', inputs.name, '--append'];
|
const args: Array<string> = ['create', '--name', inputs.name, '--append'];
|
||||||
if (node.name) {
|
if (node.name) {
|
||||||
args.push('--node', node.name);
|
args.push('--node', node.name);
|
||||||
|
} else if (inputs.driver == 'kubernetes' && (await toolkit.buildx.versionSatisfies('<0.11.0'))) {
|
||||||
|
args.push('--node', `node-${uuid.v4()}`);
|
||||||
}
|
}
|
||||||
if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
|
if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
|
||||||
await Util.asyncForEach(node['driver-opts'], async driverOpt => {
|
await Util.asyncForEach(node['driver-opts'], async driverOpt => {
|
||||||
|
Loading…
Reference in New Issue
Block a user