Skip to content

Commit 2038eac

Browse files
authored
Add GitHub action to publish container (#7)
* First pass at github action * Update repo name for testing * revert to official repo name
1 parent d636357 commit 2038eac

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/main.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: main
2+
3+
on:
4+
push:
5+
branches: main
6+
7+
jobs:
8+
login:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check Out Repo
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
17+
- name: Login to Public ECR
18+
uses: docker/login-action@v1
19+
with:
20+
registry: public.ecr.aws
21+
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
22+
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23+
env:
24+
AWS_REGION: us-east-1
25+
26+
- name: Build and push container
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: .
30+
push: true
31+
tags: public.ecr.aws/aws-containers/hello-app-runner:latest

0 commit comments

Comments
 (0)