Skip to content

Commit 5eeba2c

Browse files
committed
Allow customizing the buildx version used by the deploys that use buildx
Summary: A user has reported that they are getting strange cache related errors since buildkit upgraded to v0.13.0. Give users the ability to customize which buildx version is being used. Test Plan: Test a serverless deploy with the new input set and not set
1 parent 7c2f65f commit 5eeba2c

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

actions/hybrid_branch_deploy/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ inputs:
1414
required: false
1515
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
1616
default: 'true'
17+
buildx_version:
18+
required: false
19+
description: "Which version of buildx to use to build and deploy the Docker image."
20+
1721
outputs:
1822
deployment:
1923
description: "Name of the branch deployment for this PR"
@@ -56,6 +60,8 @@ runs:
5660
- name: Set up Docker Buildx
5761
if: ${{ github.event.pull_request.state != 'closed' }}
5862
uses: docker/setup-buildx-action@v2
63+
with:
64+
${{ inputs.buildx_version != '' && 'version: ' + inputs.buildx_version || '' }}
5965
6066
# See https://github.com/docker/build-push-action/ for more info
6167
- name: Build and push Docker image

actions/hybrid_prod_deploy/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ inputs:
1919
required: false
2020
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
2121
default: 'true'
22+
buildx_version:
23+
required: false
24+
description: "Which version of buildx to use to build and deploy the Docker image."
2225

2326
runs:
2427
using: "composite"
@@ -45,6 +48,8 @@ runs:
4548

4649
- name: Set up Docker Buildx
4750
uses: docker/setup-buildx-action@v2
51+
with:
52+
${{ inputs.buildx_version != '' && 'version: ' + inputs.buildx_version || '' }}
4853
4954
- name: Build and push Docker image
5055
uses: docker/build-push-action@v4

actions/serverless_branch_deploy/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ inputs:
2020
required: false
2121
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
2222
default: 'true'
23+
buildx_version:
24+
required: false
25+
description: "Which version of buildx to use to build and deploy the Docker image."
26+
2327
outputs:
2428
deployment:
2529
description: "Name of the branch deployment for this PR"
2630
value: ${{ steps.deploy.outputs.deployment }}
27-
31+
2832
runs:
2933
using: "composite"
3034
steps:
@@ -73,6 +77,8 @@ runs:
7377
- name: Set up Docker Buildx
7478
if: ${{ github.event.pull_request.state != 'closed' }}
7579
uses: docker/setup-buildx-action@v2
80+
with:
81+
${{ inputs.buildx_version != '' && 'version: ' + inputs.buildx_version || '' }}
7682
7783
- name: Copy user code template file
7884
if: ${{ github.event.pull_request.state != 'closed' }}

actions/serverless_prod_deploy/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ inputs:
2424
required: false
2525
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
2626
default: 'true'
27+
buildx_version:
28+
required: false
29+
description: "Which version of buildx to use to build and deploy the Docker image."
2730

2831
runs:
2932
using: "composite"
@@ -62,6 +65,8 @@ runs:
6265

6366
- name: Set up Docker Buildx
6467
uses: docker/setup-buildx-action@v2
68+
with:
69+
${{ inputs.buildx_version != '' && 'version: ' + inputs.buildx_version || '' }}
6570
6671
- name: Copy user code template file
6772
uses: ./action-repo/actions/utils/copy_template

0 commit comments

Comments
 (0)