Skip to content

Commit 5fa9864

Browse files
authored
disable aws related steps if pr run (#85)
If a PR is created from a fork, then GitHub secrets are not available to the fork (for security reasons). This will cause the AWS related steps to fail. So we should skip such steps that rely on the GH secret for PR workflow runs. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
2 parents 523f617 + 71ebdbc commit 5fa9864

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/actions/artifacts_build/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ runs:
4444
run_unit_tests: true
4545

4646
- name: Configure AWS Credentials
47+
if: inputs.push_image == true
4748
uses: aws-actions/configure-aws-credentials@v4
4849
with:
4950
role-to-assume: ${{ inputs.snapshot-ecr-role }}
@@ -65,6 +66,7 @@ runs:
6566
uses: docker/setup-buildx-action@v3
6667

6768
- name: Login to AWS ECR
69+
if: inputs.push_image == true
6870
uses: docker/login-action@v3
6971
with:
7072
registry: ${{ inputs.image_registry }}

0 commit comments

Comments
 (0)