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 release verification to cover Mac OS appropriately #1299

Merged
merged 7 commits into from
Jan 16, 2025

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Jan 16, 2025

This makes sure that release verification runs jobs on MacOS as intended.

Example release in pulumi/pulumi-xyz#756 - see https://github.com/pulumi/pulumi-xyz/actions/runs/12817331557

Looks like there were a few bugs in the code:

  • different variable naming
  • treatment of boolean vs string
  • github.event.inputs vs inputs - according to GitHub docs these treat booleans differently (!), but it has to be inputs.* I believe to be available in both workflow_call context and workflow_dispatch context

@t0yv0 t0yv0 requested a review from a team January 16, 2025 21:02
@@ -64,7 +64,7 @@ jobs:
# Expression expands to ["ubuntu-latest","windows-latest"] or ["ubuntu-latest","windows-latest","macos-latest"]
# GitHub expressions don't have 'if' statements, so we use a ternary operator to conditionally include the MacOS runner suffix.
# See the docs for a similar example to this: https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson
runner: ${{ fromJSON(format('["ubuntu-latest","windows-latest"{0}]', github.event.inputs.enableMacRunner == 'true' && ',"macos-latest"' || '')) }}
runner: ${{ fromJSON(format('["ubuntu-latest","windows-latest"{0}]', inputs.enableMacRunner && ',"macos-latest"' || '')) }} #
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only we had a more readable way to express this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: trailing "#"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be a more readable way but testing is hard, so i just tested this one and would like to roll with it.

Copy link
Member

@rquitales rquitales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@t0yv0 t0yv0 merged commit 74c4805 into master Jan 16, 2025
4 checks passed
@t0yv0 t0yv0 deleted the t0yv0/fix-release-verification branch January 16, 2025 21:36
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.

2 participants