Try full url #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Build And Upload Beta Artifact | |
env: | |
# Use terraform assume role for uploading to ecr | |
AWS_ASSUME_ROLE: ${{ secrets.TERRAFORM_AWS_ASSUME_ROLE }} | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "upload-beta-workflow" | |
jobs: | |
MakeBinary: | |
name: 'MakeContainerImage' | |
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 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: 506463145083.dkr.ecr.us-west-2.amazonaws.com/cwagent-operator-beta:latest | |
platforms: linux/amd64, linux/arm64 |