From 829985aa74f5e7ace1a0e5b62495b0227c585f49 Mon Sep 17 00:00:00 2001 From: gibsondan Date: Fri, 15 Mar 2024 14:17:00 -0500 Subject: [PATCH] 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 --- actions/hybrid_branch_deploy/action.yml | 6 ++++++ actions/hybrid_prod_deploy/action.yml | 5 +++++ actions/serverless_branch_deploy/action.yml | 9 ++++++++- actions/serverless_prod_deploy/action.yml | 5 +++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/actions/hybrid_branch_deploy/action.yml b/actions/hybrid_branch_deploy/action.yml index 18c4c95a..ef8514fd 100644 --- a/actions/hybrid_branch_deploy/action.yml +++ b/actions/hybrid_branch_deploy/action.yml @@ -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" @@ -56,6 +60,8 @@ runs: - name: Set up Docker Buildx if: ${{ github.event.pull_request.state != 'closed' }} uses: docker/setup-buildx-action@v2 + with: + version: ${{ inputs.buildx_version }} # See https://github.com/docker/build-push-action/ for more info - name: Build and push Docker image diff --git a/actions/hybrid_prod_deploy/action.yml b/actions/hybrid_prod_deploy/action.yml index 67ba0ab4..3d570a07 100644 --- a/actions/hybrid_prod_deploy/action.yml +++ b/actions/hybrid_prod_deploy/action.yml @@ -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" @@ -45,6 +48,8 @@ runs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + with: + version: ${{ inputs.buildx_version }} - name: Build and push Docker image uses: docker/build-push-action@v4 diff --git a/actions/serverless_branch_deploy/action.yml b/actions/serverless_branch_deploy/action.yml index 61844727..0443de14 100644 --- a/actions/serverless_branch_deploy/action.yml +++ b/actions/serverless_branch_deploy/action.yml @@ -20,11 +20,16 @@ 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." + default: '' + outputs: deployment: description: "Name of the branch deployment for this PR" value: ${{ steps.deploy.outputs.deployment }} - + runs: using: "composite" steps: @@ -73,6 +78,8 @@ runs: - name: Set up Docker Buildx if: ${{ github.event.pull_request.state != 'closed' }} uses: docker/setup-buildx-action@v2 + with: + version: ${{ inputs.buildx_version }} - name: Copy user code template file if: ${{ github.event.pull_request.state != 'closed' }} diff --git a/actions/serverless_prod_deploy/action.yml b/actions/serverless_prod_deploy/action.yml index 910dbe30..af92b26d 100644 --- a/actions/serverless_prod_deploy/action.yml +++ b/actions/serverless_prod_deploy/action.yml @@ -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" @@ -62,6 +65,8 @@ runs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + with: + version: ${{ inputs.buildx_version }} - name: Copy user code template file uses: ./action-repo/actions/utils/copy_template