Skip to content

Commit

Permalink
Merge pull request #219 from crazy-max/ci-k3s-append
Browse files Browse the repository at this point in the history
set node name for k8s driver when appending nodes
  • Loading branch information
crazy-max authored Jun 6, 2023
2 parents 95cefc3 + 5bb6d36 commit d957594
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,3 +496,53 @@ jobs:
uses: ./
with:
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 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
const args: Array<string> = ['create', '--name', inputs.name, '--append'];
if (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'))) {
await Util.asyncForEach(node['driver-opts'], async driverOpt => {
Expand Down

0 comments on commit d957594

Please sign in to comment.