Skip to content

fix: simplify workflow boolean checks#58

Merged
katiewasnothere merged 1 commit into
apple:mainfrom
incertum:fix-unsound-conditions
Dec 4, 2025
Merged

fix: simplify workflow boolean checks#58
katiewasnothere merged 1 commit into
apple:mainfrom
incertum:fix-unsound-conditions

Conversation

@incertum

@incertum incertum commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

I believe the issue was that ${{ inputs.publish }} got evaluated to a string ... and this way it follows the recommended practices more closely as well.

Just to double-check: The intention is for these workflows to run when inputs.publish is false? This is what it would do now, because of ${{ !false }} which becomes true. On the other hand changing inputs.publish to true: ${{ !true }} becomes false and it will not run.

CC @madrob

error[�]8;;https://docs.zizmor.sh/audits/#unsound-condition�\unsound-condition�]8;;�\]: unsound conditional expression
       --> ./container-builder-shim/.github/workflows/common.yml:68:9
        |
     68 |         if: ${{ inputs.publish }} != true
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ condition always evaluates to true
        |
        = note: audit confidence → High
     
     error[�]8;;https://docs.zizmor.sh/audits/#unsound-condition�\unsound-condition�]8;;�\]: unsound conditional expression
       --> ./container-builder-shim/.github/workflows/common.yml:76:9
        |
     76 |         if: ${{ inputs.publish }} != true
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ condition always evaluates to true
        |
        = note: audit confidence → High

Signed-off-by: Melissa Kilby <mkilby@apple.com>

@katiewasnothere katiewasnothere left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, the intention was to only publish tar files for the images when we aren't making a release. That way people can download the newly built builder images and test it locally if they'd like. When we're making a release, we publish the builder image to ghcr.io so it's not necessary to also publish as an artifact of the build pipeline.

@katiewasnothere
katiewasnothere merged commit b1f1d80 into apple:main Dec 4, 2025
2 checks passed
@madrob

madrob commented Dec 4, 2025

Copy link
Copy Markdown

I think it would have been much cleaner to move the build/publish steps to the calling workflows instead of keeping the conditional logic here, but that can be a future improvement.

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.

3 participants