@@ -333,14 +333,8 @@ jobs:
333
333
with :
334
334
context : .
335
335
336
- standalone :
336
+ standalone-cmd :
337
337
runs-on : ubuntu-latest
338
- strategy :
339
- fail-fast : false
340
- matrix :
341
- buildx-version :
342
- - latest
343
- - " "
344
338
steps :
345
339
-
346
340
name : Checkout
@@ -352,15 +346,18 @@ jobs:
352
346
-
353
347
name : Set up Docker Buildx
354
348
uses : ./
355
- with :
356
- version : ${{ matrix.buildx-version }}
357
349
-
358
- name : Check available in path
359
- if : matrix.standalone
350
+ name : Create Dockerfile
351
+ run : |
352
+ cat > ./Dockerfile <<EOL
353
+ FROM alpine
354
+ EOL
355
+ -
356
+ name : Build
360
357
run : |
361
- buildx version
358
+ buildx build .
362
359
363
- standalone-install-error :
360
+ standalone-action :
364
361
runs-on : ubuntu-latest
365
362
steps :
366
363
-
@@ -372,60 +369,43 @@ jobs:
372
369
sudo apt-get purge -y moby-cli moby-buildx
373
370
-
374
371
name : Set up Docker Buildx
375
- id : buildx
376
- continue-on-error : true
377
372
uses : ./
378
373
with :
379
- install : true
374
+ version : ${{ matrix.buildx-version }}
380
375
-
381
- name : Check
376
+ name : Create Dockerfile
382
377
run : |
383
- echo "${{ toJson(steps.buildx) }}"
384
- if [ "${{ steps.buildx.outcome }}" != "failure" ] || [ "${{ steps.buildx.conclusion }}" != "success" ]; then
385
- echo "::error::Should have failed"
386
- exit 1
387
- fi
378
+ cat > ./Dockerfile <<EOL
379
+ FROM alpine
380
+ EOL
381
+ -
382
+ name : Build
383
+ uses : docker/build-push-action@master
384
+ with :
385
+ context : .
388
386
389
- standalone-kubernetes :
387
+ standalone-install-error :
390
388
runs-on : ubuntu-latest
391
389
steps :
392
390
-
393
391
name : Checkout
394
392
uses : actions/checkout@v3
395
393
-
396
- name : Uninstall moby
397
- run : |
398
- sudo apt-get purge -y moby-engine moby-cli moby-buildx
399
- -
400
- name : Setup k8s cluster
401
- run : |
402
- set -x
403
- sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
404
- echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
405
- sudo apt-get update
406
- sudo apt-get install -y kubelet kubeadm kubectl
407
- sudo swapoff -a
408
- sudo kubeadm init --cri-socket /run/containerd/containerd.sock
409
- mkdir -p $HOME/.kube/
410
- sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
411
- sudo chown $USER $HOME/.kube/config
412
- kubectl taint nodes --all node-role.kubernetes.io/master-
413
- kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
414
- kubectl wait --for=condition=ready --timeout=30s node --all
415
- kubectl get nodes -o wide
416
- -
417
- name : Create Dockerfile
394
+ name : Uninstall docker cli
418
395
run : |
419
- cat > ./Dockerfile <<EOL
420
- FROM alpine
421
- RUN echo hello
422
- EOL
396
+ sudo apt-get purge -y moby-cli moby-buildx
423
397
-
424
398
name : Set up Docker Buildx
399
+ id : buildx
400
+ continue-on-error : true
425
401
uses : ./
426
402
with :
427
- driver : kubernetes
403
+ install : true
428
404
-
429
- name : Build
405
+ name : Check
430
406
run : |
431
- buildx build .
407
+ echo "${{ toJson(steps.buildx) }}"
408
+ if [ "${{ steps.buildx.outcome }}" != "failure" ] || [ "${{ steps.buildx.conclusion }}" != "success" ]; then
409
+ echo "::error::Should have failed"
410
+ exit 1
411
+ fi
0 commit comments