From ae3392c412596a2176d5c207b08a2e607c022ddf Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Wed, 17 Jul 2024 14:42:16 -0400 Subject: [PATCH 1/3] update build job --- .github/workflows/build-rust-injector.yml | 18 +++++++----------- Makefile | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-rust-injector.yml b/.github/workflows/build-rust-injector.yml index 270a091fcf..9c12488113 100644 --- a/.github/workflows/build-rust-injector.yml +++ b/.github/workflows/build-rust-injector.yml @@ -9,9 +9,6 @@ on: versionTag: description: "Version tag" required: true - branchName: - description: "Branch to build the injector from" - required: true jobs: build-injector: @@ -19,8 +16,6 @@ jobs: steps: - name: "Checkout Repo" uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - ref: ${{ github.event.inputs.branchName }} - name: Install tools uses: ./.github/actions/install-tools @@ -37,13 +32,14 @@ jobs: shasum zarf-injector-amd64 >> checksums.txt shasum zarf-injector-arm64 >> checksums.txt - - name: Set AWS Credentials - uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 + - name: Auth with AWS + uses: aws-actions/configure-aws-credentials@v3 with: - aws-access-key-id: ${{ secrets.AWS_GOV_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_GOV_SECRET_ACCESS_KEY }} - aws-region: us-gov-west-1 + role-to-assume: ${{ secrets.AWS_WRITE_ROLE }} + role-session-name: ${{ github.job || github.event.client_payload.pull_request.head.sha || github.sha }} + aws-region: us-east-2 + role-duration-seconds: 3600 - name: Sync Artifacts to S3 run: | - aws s3 sync src/injector/dist/ s3://zarf-public/injector/${{ github.event.inputs.versionTag }}/ + aws s3 sync src/injector/dist/ s3://zarf-init/injector/${{ github.event.inputs.versionTag }}/ diff --git a/Makefile b/Makefile index 9a4fa4e58e..88a7729dba 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ build-local-agent-image: ## Build the Zarf agent image to be used in a locally b @ if [ "$(ARCH)" = "amd64" ]; then cp build/zarf build/zarf-linux-amd64; fi @ if [ "$(ARCH)" = "arm64" ] && [ ! -s ./build/zarf-arm ]; then $(MAKE) build-cli-linux-arm; fi @ if [ "$(ARCH)" = "arm64" ]; then cp build/zarf-arm build/zarf-linux-arm64; fi - docker buildx build --load --platform linux/$(ARCH) --tag ghcr.io/defenseunicorns/zarf/agent:local . + docker buildx build --load --platform linux/$(ARCH) --tag ghcr.io/defenseunicorns/zarf/agent:local-ecr . @ if [ "$(ARCH)" = "amd64" ]; then rm build/zarf-linux-amd64; fi @ if [ "$(ARCH)" = "arm64" ]; then rm build/zarf-linux-arm64; fi From ef19cf93df9cb7c275d240bf362b1592d632e4a4 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Wed, 17 Jul 2024 14:43:35 -0400 Subject: [PATCH 2/3] reset make --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 88a7729dba..9a4fa4e58e 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ build-local-agent-image: ## Build the Zarf agent image to be used in a locally b @ if [ "$(ARCH)" = "amd64" ]; then cp build/zarf build/zarf-linux-amd64; fi @ if [ "$(ARCH)" = "arm64" ] && [ ! -s ./build/zarf-arm ]; then $(MAKE) build-cli-linux-arm; fi @ if [ "$(ARCH)" = "arm64" ]; then cp build/zarf-arm build/zarf-linux-arm64; fi - docker buildx build --load --platform linux/$(ARCH) --tag ghcr.io/defenseunicorns/zarf/agent:local-ecr . + docker buildx build --load --platform linux/$(ARCH) --tag ghcr.io/defenseunicorns/zarf/agent:local . @ if [ "$(ARCH)" = "amd64" ]; then rm build/zarf-linux-amd64; fi @ if [ "$(ARCH)" = "arm64" ]; then rm build/zarf-linux-arm64; fi From e7f98195634db209ff800187c813ce44584b5e3f Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Wed, 17 Jul 2024 14:45:27 -0400 Subject: [PATCH 3/3] using v4 again --- .github/workflows/build-rust-injector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-rust-injector.yml b/.github/workflows/build-rust-injector.yml index 9c12488113..77d939f6f7 100644 --- a/.github/workflows/build-rust-injector.yml +++ b/.github/workflows/build-rust-injector.yml @@ -33,7 +33,7 @@ jobs: shasum zarf-injector-arm64 >> checksums.txt - name: Auth with AWS - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 with: role-to-assume: ${{ secrets.AWS_WRITE_ROLE }} role-session-name: ${{ github.job || github.event.client_payload.pull_request.head.sha || github.sha }}