Skip to content

Commit 68c0969

Browse files
committed
nit: only prepare credentials on main branch
1 parent 222c5ca commit 68c0969

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
4141

4242
- name: Configure AWS credentials
43+
if: github.ref == 'refs/heads/main'
4344
uses: aws-actions/configure-aws-credentials@v1
4445
with:
4546
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -48,6 +49,7 @@ jobs:
4849

4950
- name: Login to Amazon ECR
5051
id: ecr-login
52+
if: github.ref == 'refs/heads/main'
5153
uses: aws-actions/amazon-ecr-login@v1
5254

5355
- name: Docker build

0 commit comments

Comments
 (0)