Skip to content

ci: push docker image to aws ecr #4

ci: push docker image to aws ecr

ci: push docker image to aws ecr #4

Workflow file for this run

name: docker
on: [push]
jobs:
docker:

Check failure on line 6 in .github/workflows/docker.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker.yaml

Invalid workflow file

You have an error in your yaml syntax on line 6
strategy:
matrix:
os:
- ubuntu-latest
registry:
- 'docker.io'
- 'public.ecr.aws'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v2
- uses: docker/login-action@v2
if: matrix.registry == 'docker.io'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to AWS ECR
uses: docker/login-action@v2
if: matrix.registry == 'public.ecr.aws'
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ecr: true
- uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ matrix.registry }}/${{ github.repository }}