|
10 | 10 | - name: Checkout
|
11 | 11 | uses: actions/checkout@v2
|
12 | 12 |
|
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 |
33 | 15 |
|
34 | 16 | - name: Login to Public ECR
|
35 | 17 | uses: docker/login-action@v1
|
|
60 | 42 | - name: Maven package
|
61 | 43 | run: mvn package -B
|
62 | 44 |
|
63 |
| - # - name: debug |
64 |
| - # run: cat ~/.docker/config.json |
65 |
| - |
66 | 45 | - name: Build and push Docker images
|
67 | 46 |
|
68 | 47 | with:
|
|
71 | 50 | push: true
|
72 | 51 | tags: |
|
73 | 52 | public.ecr.aws/m4k8r3n4/k8s-demo-app:latest
|
| 53 | + public.ecr.aws/m4k8r3n4/k8s-demo-app:$RELEASE_VERSION |
| 54 | + |
0 commit comments