Skip to content

Commit

Permalink
Allow customizing the buildx version used by the deploys that use buildx
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gibsondan committed Mar 15, 2024
1 parent 7c2f65f commit 5eeba2c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
6 changes: 6 additions & 0 deletions actions/hybrid_branch_deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
required: false
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
default: 'true'
buildx_version:
required: false
description: "Which version of buildx to use to build and deploy the Docker image."

outputs:
deployment:
description: "Name of the branch deployment for this PR"
Expand Down Expand Up @@ -56,6 +60,8 @@ runs:
- name: Set up Docker Buildx
if: ${{ github.event.pull_request.state != 'closed' }}
uses: docker/setup-buildx-action@v2
with:
${{ inputs.buildx_version != '' && 'version: ' + inputs.buildx_version || '' }}
# See https://github.com/docker/build-push-action/ for more info
- name: Build and push Docker image
Expand Down
5 changes: 5 additions & 0 deletions actions/hybrid_prod_deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
required: false
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
default: 'true'
buildx_version:
required: false
description: "Which version of buildx to use to build and deploy the Docker image."

runs:
using: "composite"
Expand All @@ -45,6 +48,8 @@ runs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
${{ inputs.buildx_version != '' && 'version: ' + inputs.buildx_version || '' }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
Expand Down
8 changes: 7 additions & 1 deletion actions/serverless_branch_deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ inputs:
required: false
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
default: 'true'
buildx_version:
required: false
description: "Which version of buildx to use to build and deploy the Docker image."

outputs:
deployment:
description: "Name of the branch deployment for this PR"
value: ${{ steps.deploy.outputs.deployment }}

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -73,6 +77,8 @@ runs:
- name: Set up Docker Buildx
if: ${{ github.event.pull_request.state != 'closed' }}
uses: docker/setup-buildx-action@v2
with:
${{ inputs.buildx_version != '' && 'version: ' + inputs.buildx_version || '' }}
- name: Copy user code template file
if: ${{ github.event.pull_request.state != 'closed' }}
Expand Down
5 changes: 5 additions & 0 deletions actions/serverless_prod_deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ inputs:
required: false
description: "Whether to start the action by checking out the repository. Set to false if your workflow modifies the file structure before deploying."
default: 'true'
buildx_version:
required: false
description: "Which version of buildx to use to build and deploy the Docker image."

runs:
using: "composite"
Expand Down Expand Up @@ -62,6 +65,8 @@ runs:

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

0 comments on commit 5eeba2c

Please sign in to comment.