Skip to content

Merge pull request #12 from whoan/test-issue-133 #148

Merge pull request #12 from whoan/test-issue-133

Merge pull request #12 from whoan/test-issue-133 #148

Workflow file for this run

name: aws-ecr
on: [push]
jobs:
build-ecr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: whoan/docker-build-with-cache-action@master
with:
username: "${{ secrets.AWS_ACCESS_KEY_ID }}"
password: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
registry: 861729690598.dkr.ecr.us-west-1.amazonaws.com
image_name: hello-world
build-ecr-public:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: whoan/docker-build-with-cache-action@master
with:
username: "${{ secrets.AWS_ACCESS_KEY_ID }}"
password: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
registry: public.ecr.aws
image_name: hello-world-public
build-ecr-with-role:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.NON_ROOT_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.NON_ROOT_SECRET_ACCESS_KEY }}
role-to-assume: arn:aws:iam::861729690598:role/my-ecr-role
aws-region: us-west-1
- uses: whoan/docker-build-with-cache-action@master
with:
registry: 861729690598.dkr.ecr.us-west-1.amazonaws.com
image_name: hello-world-with-role
build-ecr-with-role-public:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.NON_ROOT_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.NON_ROOT_SECRET_ACCESS_KEY }}
role-to-assume: arn:aws:iam::861729690598:role/my-ecr-role
aws-region: us-east-1
- uses: whoan/docker-build-with-cache-action@master
with:
registry: public.ecr.aws
image_name: hello-world-with-role-public