Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kapilt
Copy link

@kapilt kapilt commented Jan 10, 2024

closes #3073

@kapilt kapilt force-pushed the fix/dont-require-setupgolangs-on-binary-release branch from 7441268 to b4c2952 Compare January 10, 2024 11:32
@@ -77,6 +77,7 @@ runs:

- name: Set up Go environment
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
if: $${{ inputs.compile-builder }}
Copy link
Collaborator

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.

Copy link
Author

@kapilt kapilt Jan 10, 2024

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 }}"

Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] avoid setup-golang tools when downloading a binary
3 participants