Merge remote-tracking branch 'origin/main' #22
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
--- | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
concurrency: ci | |
jobs: | |
build: | |
runs-on: 'ubuntu-22.04' # ['hyperenv', 'medium'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::820394158530:role/github-openid-connect | |
role-session-name: github-actions-hello | |
aws-region: eu-west-1 | |
- name: Build and push images to ECR | |
run: | | |
whoami | |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws | |
docker buildx create --use | |
docker buildx build --platform linux/amd64,linux/arm64 --push -t public.ecr.aws/l0j0k6k8/hello:latest -f Dockerfile_latest . | |
docker buildx build --platform linux/amd64,linux/arm64 --push -t public.ecr.aws/l0j0k6k8/hello:v1 -f Dockerfile_v1 . | |
docker buildx build --platform linux/amd64,linux/arm64 --push -t public.ecr.aws/l0j0k6k8/hello:v2 -f Dockerfile_v2 . |