Skip to content

Commit cf461ed

Browse files
authored
fix condition in custom action (#87)
The [previous change did not work](#85) as expected (failed [run](https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/8086789976/job/22097309271) as evidence) since the inputs [are not actually boolean](actions/runner#1483). So we should be comparing against the string `'true'` or `'false'` to make the conditions work correctly. Unfortunately, GH doesn't yet support input type for custom actions: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputs By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent d27121a commit cf461ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/actions/artifacts_build/action.yml

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

4646
- name: Configure AWS Credentials
47-
if: inputs.push_image == true
47+
if: ${{ inputs.push_image == true || inputs.push_image == 'true' }}
4848
uses: aws-actions/configure-aws-credentials@v4
4949
with:
5050
role-to-assume: ${{ inputs.snapshot-ecr-role }}
@@ -66,7 +66,7 @@ runs:
6666
uses: docker/setup-buildx-action@v3
6767

6868
- name: Login to AWS ECR
69-
if: inputs.push_image == true
69+
if: ${{ inputs.push_image == true || inputs.push_image == 'true' }}
7070
uses: docker/login-action@v3
7171
with:
7272
registry: ${{ inputs.image_registry }}

0 commit comments

Comments
 (0)