-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: don't setup-golang when downloading a binary #3074
base: main
Are you sure you want to change the base?
fix: don't setup-golang when downloading a binary #3074
Conversation
Signed-off-by: Kapil Thangavelu <[email protected]>
7441268
to
b4c2952
Compare
@@ -77,6 +77,7 @@ runs: | |||
|
|||
- name: Set up Go environment | |||
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |||
if: $${{ inputs.compile-builder }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo -> ${{ inputs.compile-builder }}
. Btw, do we need to write it as ${{ inputs.compile-builder }} == 'true'
? I never remember about this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaics it was being passed as a boolean re required arg vs string.
❯ rg compile-builder .
./workflows/pre-submit.e2e.go.config-ldflags-main-dir.yml
56: compile-builder: true
./workflows/builder_go_slsa3.yml
85: compile-builder:
167: compile-builder: "${{ inputs.compile-builder }}"
./workflows/pre-submit.e2e.container-based.default.yml
39: compile-builder: true
./workflows/generator_generic_slsa3.yml
172: compile-builder: "${{ inputs.compile-generator }}"
./workflows/generator_container_slsa3.yml
152: compile-builder: "${{ inputs.compile-generator }}"
./workflows/release.yml
67: compile-builder: true
80: compile-builder: true
93: compile-builder: true
106: compile-builder: true
./workflows/pre-submit.actions.yml
492: # Tests that generate-builder works with compile-builder=true.
501: compile-builder: true
506: # Tests that generate-builder works with compile-builder=false.
522: # NOTE: compile-builder explicitly set to false.
523: compile-builder: false
./workflows/builder_container-based_slsa3.yml
82: compile-builder:
207: compile-builder: "${{ inputs.compile-builder }}"
./actions/generate-builder/action.yml
30: compile-builder:
80: if: $${{ inputs.compile-builder }}
92: # release binaries when the compile-builder input is false.
98: COMPILE_BUILDER: "${{ inputs.compile-builder }}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All inputs in GitHub Actions are basically strings so I think we'll need to do compile-builder == 'true'
otherwise it's a test whether the string is empty or not.
https://stackoverflow.com/questions/76292948/github-action-boolean-input-with-default-value
closes #3073