-
Notifications
You must be signed in to change notification settings - Fork 1
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: Fix linux build with CGO_ENABLED=0 #311
Conversation
- amd64 | ||
- arm64 | ||
env: | ||
- CGO_ENABLED=0 |
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.
Running the binary in a linux environment would fail if it's built with CGO.
.github/actions/publish/action.yml
Outdated
@@ -36,7 +36,7 @@ runs: | |||
uses: goreleaser/goreleaser-action@v5 | |||
with: | |||
version: latest | |||
args: release ${{ inputs.dry-run == 'true' && '--skip=publish' || '' }} | |||
args: release ${{ inputs.dry-run-gh == true && '--skip=publish' || '' }} --config .goreleaser.yaml |
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.
Added a more granular variable that decides to run the action or not and specifies the config file that says how to build the binary.
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.
There's no dry-run-gh
input defined in this (publish
) action
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.
So, as far as I know github actions inputs are strings. This change (removing the '..'
) means you're casting the value to a bool and it'll always evaluate to true (probably?) if any string is present.
I'd recommend leaving it as an explicit comparison to the value 'true'
.
Yea, it's really frustrating.
@@ -3,14 +3,24 @@ on: | |||
workflow_dispatch: | |||
inputs: | |||
dry-run: | |||
default: true |
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.
Sorted these values.
.github/workflows/manual-publish.yml
Outdated
type: boolean | ||
dry-run-gh: |
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.
Added more granular variables for manual publishing.
I ran the manual publish workflow and got feedback that the generated linux binary works now. |
.github/actions/publish/action.yml
Outdated
@@ -36,7 +36,7 @@ runs: | |||
uses: goreleaser/goreleaser-action@v5 | |||
with: | |||
version: latest | |||
args: release ${{ inputs.dry-run == 'true' && '--skip=publish' || '' }} | |||
args: release ${{ inputs.dry-run-gh == true && '--skip=publish' || '' }} --config .goreleaser.yaml |
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.
There's no dry-run-gh
input defined in this (publish
) action
.github/actions/publish/action.yml
Outdated
@@ -36,7 +36,7 @@ runs: | |||
uses: goreleaser/goreleaser-action@v5 | |||
with: | |||
version: latest | |||
args: release ${{ inputs.dry-run == 'true' && '--skip=publish' || '' }} | |||
args: release ${{ inputs.dry-run-gh == true && '--skip=publish' || '' }} --config .goreleaser.yaml |
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.
So, as far as I know github actions inputs are strings. This change (removing the '..'
) means you're casting the value to a bool and it'll always evaluate to true (probably?) if any string is present.
I'd recommend leaving it as an explicit comparison to the value 'true'
.
Yea, it's really frustrating.
Runs the goreleaser action with the goreleaser.yaml file that has a new builds section.
Requirements
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.