Skip to content

Commit

Permalink
add bin build
Browse files Browse the repository at this point in the history
  • Loading branch information
okankoAMZ committed Oct 10, 2024
1 parent 65fd3cf commit 49e941c
Showing 1 changed file with 41 additions and 11 deletions.
52 changes: 41 additions & 11 deletions .github/workflows/build-and-upload-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
MakeBinary:
name: 'MakeContainerImage'
runs-on: ubuntu-latest
needs: MakeTABinary
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -71,6 +72,46 @@ jobs:
- name: Set up QEMU
if: steps.cached_binaries.outputs.cache-hit == false
uses: docker/setup-qemu-action@v1
MakeTABinary:
name: 'MakeTargetAllocatorImage'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ~1.19.6
cache: false

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.AWS_ASSUME_ROLE }}
aws-region: us-west-2

- name: Login to ECR
if: steps.cached_binaries.outputs.cache-hit == false
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Set up Docker Buildx
if: steps.cached_binaries.outputs.cache-hit == false
uses: docker/setup-buildx-action@v1

- name: Set up QEMU
if: steps.cached_binaries.outputs.cache-hit == false
uses: docker/setup-qemu-action@v1

- name: Build Binaries
run: |
export GOARCH=arm64 && make target-allocator
export GOARCH=amd64 && make target-allocator
- name: Build Cloudwatch Agent Target Allocator Image and push to ECR
uses: docker/build-push-action@v4
if: steps.cached_binaries.outputs.cache-hit == false
Expand All @@ -81,17 +122,6 @@ jobs:
tags: ${{ env.ECR_TARGET_ALLOCATOR_STAGING_REPO }}:${{ inputs.tag }}
platforms: linux/amd64, linux/arm64

- name: Build Cloudwatch Agent Operator Image and push to ECR
uses: docker/build-push-action@v4
if: steps.cached_binaries.outputs.cache-hit == false
with:
file: ./Dockerfile
context: .
push: true
tags: ${{ env.ECR_OPERATOR_STAGING_REPO }}:${{ inputs.tag }}
platforms: linux/amd64, linux/arm64


e2e-test:
name: "Application Signals E2E Test"
needs: MakeBinary
Expand Down

0 comments on commit 49e941c

Please sign in to comment.