File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 3232 - ' subaction/**'
3333
3434env :
35- BUILDX_VERSION : latest
35+ BUILDX_VERSION : v0.18.0
3636 BUILDKIT_IMAGE : moby/buildkit:buildx-stable-1
3737
3838jobs :
@@ -153,6 +153,11 @@ jobs:
153153 -
154154 name : Checkout
155155 uses : actions/checkout@v4
156+ -
157+ name : Set up Docker Buildx
158+ uses : docker/setup-buildx-action@v3
159+ with :
160+ version : ${{ inputs.buildx-version || env.BUILDX_VERSION }}
156161 -
157162 name : Build
158163 uses : ./
@@ -522,3 +527,31 @@ jobs:
522527 name : Check docker
523528 run : |
524529 docker image inspect localhost:5000/name/app:latest
530+
531+ error-buildx-latest :
532+ runs-on : ubuntu-latest
533+ steps :
534+ -
535+ name : Checkout
536+ uses : actions/checkout@v4
537+ -
538+ name : Set up Docker Buildx
539+ uses : docker/setup-buildx-action@v3
540+ with :
541+ version : v0.20.0
542+ -
543+ name : Build
544+ id : bake
545+ continue-on-error : true
546+ uses : ./
547+ with :
548+ files : |
549+ ./test/config.hcl
550+ -
551+ name : Check
552+ run : |
553+ echo "${{ toJson(steps.bake) }}"
554+ if [ "${{ steps.bake.outcome }}" != "failure" ] || [ "${{ steps.bake.conclusion }}" != "success" ]; then
555+ echo "::error::Should have failed"
556+ exit 1
557+ fi
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ actionsToolkit.run(
2020 async ( ) => {
2121 const inputs : context . Inputs = await context . getInputs ( ) ;
2222 const toolkit = new Toolkit ( ) ;
23+ if ( await toolkit . buildx . versionSatisfies ( '>=0.20.0' ) ) {
24+ throw new Error ( 'docker/bake-action < v6 is not compatible with buildx >= 0.20.0, please update your workflow to latest docker/bake-action or use an older buildx version.' ) ;
25+ }
26+
2327 const gitAuthToken = process . env . BUILDX_BAKE_GIT_AUTH_TOKEN ?? inputs [ 'github-token' ] ;
2428
2529 await core . group ( `GitHub Actions runtime token ACs` , async ( ) => {
You can’t perform that action at this time.
0 commit comments