From a72b3803091b8df02b7356f81d172b1ed79c99a9 Mon Sep 17 00:00:00 2001 From: Jake Heath Date: Tue, 5 Nov 2024 12:19:45 -0800 Subject: [PATCH 1/7] chore: add a clean parameter to the checkout --- .../argus-builder/docker-build/action.yml | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/actions/argus-builder/docker-build/action.yml b/.github/actions/argus-builder/docker-build/action.yml index 804490a4..73fa1f5c 100644 --- a/.github/actions/argus-builder/docker-build/action.yml +++ b/.github/actions/argus-builder/docker-build/action.yml @@ -3,39 +3,43 @@ description: Build a Docker Image for Argus inputs: image_name: - description: 'Name of the image to build' + description: "Name of the image to build" required: true dockerfile: - description: 'Path to the Dockerfile' + description: "Path to the Dockerfile" required: true context: - description: 'Path to the build context' + description: "Path to the build context" required: true platform: - description: 'Platform to build for' + description: "Platform to build for" required: false - default: 'linux/arm64' + default: "linux/arm64" build_args: - description: 'Args for docker build' + description: "Args for docker build" required: false - default: '' + default: "" secret_files: - description: 'Files to copy into the build context' + description: "Files to copy into the build context" required: false - default: '' + default: "" image_tag: - description: 'Additional tag to apply to the image this is built' + description: "Additional tag to apply to the image this is built" required: true github_app_id: - description: 'GitHub App ID' + description: "GitHub App ID" required: true github_private_key: - description: 'GitHub App private key' + description: "GitHub App private key" required: true + clean: + description: "Whether to clean the repository before checking out" + required: false + default: false outputs: image_uri: - description: 'URI of the image that was built' + description: "URI of the image that was built" value: ${{ steps.ecr_metadata.outputs.IMAGE_URI }} runs: @@ -43,6 +47,7 @@ runs: steps: - uses: actions/checkout@v4 with: + clean: ${{ inputs.clean }} fetch-depth: 0 path: ${{ github.event.repository.name }} - name: Configure AWS Credentials From 3e5ea1c77fe79fb6840110391aa0e4c0d7cd3287 Mon Sep 17 00:00:00 2001 From: Jake Heath Date: Tue, 5 Nov 2024 12:23:06 -0800 Subject: [PATCH 2/7] naming --- .github/actions/argus-builder/docker-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/argus-builder/docker-build/action.yml b/.github/actions/argus-builder/docker-build/action.yml index 73fa1f5c..400fd739 100644 --- a/.github/actions/argus-builder/docker-build/action.yml +++ b/.github/actions/argus-builder/docker-build/action.yml @@ -32,7 +32,7 @@ inputs: github_private_key: description: "GitHub App private key" required: true - clean: + clean_checkout: description: "Whether to clean the repository before checking out" required: false default: false @@ -47,7 +47,7 @@ runs: steps: - uses: actions/checkout@v4 with: - clean: ${{ inputs.clean }} + clean: ${{ inputs.clean_checkout }} fetch-depth: 0 path: ${{ github.event.repository.name }} - name: Configure AWS Credentials From 84f1e633acad4866a90cb50d65707798090d0cff Mon Sep 17 00:00:00 2001 From: Jake Heath Date: Wed, 6 Nov 2024 08:47:27 -0800 Subject: [PATCH 3/7] use buildkit image from pull through --- .github/actions/docker-build-push/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/docker-build-push/action.yml b/.github/actions/docker-build-push/action.yml index 7378d86e..f67b467f 100644 --- a/.github/actions/docker-build-push/action.yml +++ b/.github/actions/docker-build-push/action.yml @@ -49,6 +49,8 @@ runs: image: 533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/tonistiigi/binfmt:latest - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/moby/buildkit:master - name: Docker meta id: meta uses: docker/metadata-action@v5 From e75bb6ac6454e967b5318e0a0996d81395484a12 Mon Sep 17 00:00:00 2001 From: Jake Heath Date: Thu, 7 Nov 2024 09:20:26 -0800 Subject: [PATCH 4/7] try this --- .github/actions/docker-build-push/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/docker-build-push/action.yml b/.github/actions/docker-build-push/action.yml index f67b467f..c06552c9 100644 --- a/.github/actions/docker-build-push/action.yml +++ b/.github/actions/docker-build-push/action.yml @@ -50,7 +50,8 @@ runs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: - driver-opts: image=533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/moby/buildkit:master + driver-opts: | + image=533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/moby/buildkit:master - name: Docker meta id: meta uses: docker/metadata-action@v5 From d183c6464fdcd7381e59977edff41367136d7563 Mon Sep 17 00:00:00 2001 From: Jake Heath Date: Thu, 7 Nov 2024 09:21:07 -0800 Subject: [PATCH 5/7] wrong pin --- .github/actions/argus-builder/docker-build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/argus-builder/docker-build/action.yml b/.github/actions/argus-builder/docker-build/action.yml index 400fd739..f89e18a7 100644 --- a/.github/actions/argus-builder/docker-build/action.yml +++ b/.github/actions/argus-builder/docker-build/action.yml @@ -92,7 +92,7 @@ runs: lifecycle-policy: core-platform-settings/ecr/lifecycle-policy.json repository-policy: core-platform-settings/ecr/repository-policy.json - name: Build And Push - uses: chanzuckerberg/github-actions/.github/actions/docker-build-push@6fe6046403cf16689027cb3981781d8b05fd702b + uses: chanzuckerberg/github-actions/.github/actions/docker-build-push@heathj/test-no-clean with: dockerfile: ${{ github.event.repository.name }}/${{ inputs.dockerfile }} context: ${{ github.event.repository.name }}/${{ inputs.context }} From 74d720a183006c0fe0a82f52475befed7d992888 Mon Sep 17 00:00:00 2001 From: Jake Heath Date: Thu, 7 Nov 2024 09:26:39 -0800 Subject: [PATCH 6/7] indent --- .github/actions/docker-build-push/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/docker-build-push/action.yml b/.github/actions/docker-build-push/action.yml index c06552c9..71768a1d 100644 --- a/.github/actions/docker-build-push/action.yml +++ b/.github/actions/docker-build-push/action.yml @@ -50,8 +50,8 @@ runs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: - driver-opts: | - image=533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/moby/buildkit:master + driver-opts: | + image=533267185808.dkr.ecr.us-west-2.amazonaws.com/docker.io/central/moby/buildkit:master - name: Docker meta id: meta uses: docker/metadata-action@v5 From bb55bcc1cef144e83dcb137c00842a900acb503b Mon Sep 17 00:00:00 2001 From: Jake Heath Date: Thu, 7 Nov 2024 09:55:55 -0800 Subject: [PATCH 7/7] pin to latest docker-build --- .github/actions/argus-builder/docker-build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/argus-builder/docker-build/action.yml b/.github/actions/argus-builder/docker-build/action.yml index f89e18a7..2f048052 100644 --- a/.github/actions/argus-builder/docker-build/action.yml +++ b/.github/actions/argus-builder/docker-build/action.yml @@ -92,7 +92,7 @@ runs: lifecycle-policy: core-platform-settings/ecr/lifecycle-policy.json repository-policy: core-platform-settings/ecr/repository-policy.json - name: Build And Push - uses: chanzuckerberg/github-actions/.github/actions/docker-build-push@heathj/test-no-clean + uses: chanzuckerberg/github-actions/.github/actions/docker-build-push@74d720a183006c0fe0a82f52475befed7d992888 with: dockerfile: ${{ github.event.repository.name }}/${{ inputs.dockerfile }} context: ${{ github.event.repository.name }}/${{ inputs.context }}