Skip to content

Commit 7fd86ee

Browse files
committed
test
1 parent 941358d commit 7fd86ee

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Push Docker Image to ECR
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
push-to-ecr:
6+
runs-on: ubuntu-latest
7+
permissions:
8+
id-token: write
9+
contents: read
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
- name: Configure AWS credentials using OIDC
14+
uses: aws-actions/configure-aws-credentials@v3
15+
with:
16+
role-to-assume: arn:aws:iam::187584688086:role/github-actions-ecr-poweruser
17+
aws-region: us-east-1
18+
- name: Login to Amazon ECR
19+
run: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 187584688086.dkr.ecr.us-east-1.amazonaws.com/kafbat/kafka-ui
20+
- name: Build Docker image
21+
run: |
22+
docker pull hello-world
23+
docker tag hello-world 187584688086.dkr.ecr.us-east-1.amazonaws.com/kafbat/kafka-ui:latest
24+
- name: Push Docker image to ECR
25+
run: docker push 187584688086.dkr.ecr.us-east-1.amazonaws.com/kafbat/kafka-ui:latest

0 commit comments

Comments
 (0)