Skip to content

Commit 5d71ef1

Browse files
Update build.yml old build
1 parent 6d9242c commit 5d71ef1

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build to AWS ECR
22

3-
on: push
3+
on: push
44

55
jobs:
66
login-to-aws:
@@ -14,28 +14,25 @@ jobs:
1414
with:
1515
aws-access-key-id: ${{ secrets.ACCESS_KEY }}
1616
aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }}
17-
aws-region: ${{ secrets.PUBLIC_REGION }}
17+
aws-region: ${{ secrets.REGION }}
1818

1919
build-and-push-pub-ecr:
2020
runs-on: ubuntu-latest
21-
needs:
22-
login-to-aws:
23-
21+
needs: login-to-aws
22+
2423
steps:
2524
- name: Code Checkout
2625
uses: actions/checkout@v4
2726

28-
- name: Login to AWSECR
27+
- name: Login to AWS ECR
2928
uses: docker/login-action@v3
3029
with:
3130
registry: public.ecr.aws
3231
username: ${{ secrets.ACCESS_KEY }}
3332
password: ${{ secrets.SECRET_ACCESS_KEY }}
34-
env:
35-
aws-region: ${{ secrets.PUBLIC_REGION }}
36-
37-
- name: Build Image
33+
34+
- name: Build and Push Image
3835
run: |
39-
docker build -t bank .
40-
docker tag bank:latest public.ecr.aws/h8o8x8t1/bank:v2
41-
docker push public.ecr.aws/h8o8x8t1/bank:v2
36+
docker build -t bank .
37+
docker tag bank:latest public.ecr.aws/h8o8x8t1/bank:v1
38+
docker push public.ecr.aws/h8o8x8t1/bank:v1

0 commit comments

Comments
 (0)