Skip to content

Commit 8944944

Browse files
Update build_push_to_ecr.yaml
1 parent 063c8bf commit 8944944

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

.github/workflows/build_push_to_ecr.yaml

+4-23
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,8 @@ jobs:
1010
- name: Checkout
1111
uses: actions/checkout@v2
1212

13-
# - name: Configure AWS Credentials
14-
# # You may pin to the exact commit or the version.
15-
# # uses: aws-actions/configure-aws-credentials@13d241b293754004c80624b5567555c4a39ffbe3
16-
# uses: aws-actions/configure-aws-credentials@v1
17-
# with:
18-
# # AWS Access Key ID. This input is required if running in the GitHub hosted environment. It is optional if running in a self-hosted environment that already has AWS credentials, for example on an EC2 instance.
19-
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
20-
# # AWS Secret Access Key. This input is required if running in the GitHub hosted environment. It is optional if running in a self-hosted environment that already has AWS credentials, for example on an EC2 instance.
21-
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22-
# # AWS Region, e.g. us-east-2
23-
# aws-region: us-east-1
24-
25-
26-
#- id: install-aws-cli
27-
# uses: unfor19/install-aws-cli-action@v1
28-
# with:
29-
# version: 2 # default
30-
# verbose: false # default
31-
# - name: get docker credentials
32-
# run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/m4k8r3n4
13+
- name: Set env
14+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3315

3416
- name: Login to Public ECR
3517
uses: docker/login-action@v1
@@ -60,9 +42,6 @@ jobs:
6042
- name: Maven package
6143
run: mvn package -B
6244

63-
# - name: debug
64-
# run: cat ~/.docker/config.json
65-
6645
- name: Build and push Docker images
6746
uses: docker/[email protected]
6847
with:
@@ -71,3 +50,5 @@ jobs:
7150
push: true
7251
tags: |
7352
public.ecr.aws/m4k8r3n4/k8s-demo-app:latest
53+
public.ecr.aws/m4k8r3n4/k8s-demo-app:$RELEASE_VERSION
54+

0 commit comments

Comments
 (0)