feat: merge workflow_dispatch trigger to develop branch#215
Merged
Conversation
…_only flag Allows manually triggering a .sif build for any OpenStudio version (e.g. 3.10.0 final) without requiring a push to master/develop. - workflow_dispatch inputs: openstudio_version, openstudio_sha, openstudio_version_ext, apptainer_only - apptainer_only=true skips docker build/test, pulling directly from an existing Docker Hub image (nrel/openstudio:<version>) - apptainer job now also runs on workflow_dispatch events - Resolve version inputs step writes dispatch inputs to GITHUB_ENV so empty openstudio_version_ext is handled correctly for final releases Co-authored-by: Copilot <[email protected]>
…ispatch version inputs
The previous approach used GITHUB_ENV writes to override top-level env: block
vars, but empty string inputs were silently replaced with the input default
value by GitHub before bash ever ran.
Root cause (from research): when gh CLI passes --field key="" or a user
leaves an input blank, GitHub substitutes the input's default: value. Also,
the || operator in GHA expressions treats "" as falsy, so expressions like
${{ inputs.x || env.X }} always fall back to the env: value for empty inputs.
Fix: introduce a setup job that uses GITHUB_OUTPUT to resolve version vars
once in bash (where empty string is genuinely empty), and have docker and
apptainer jobs consume them via needs.setup.outputs. Empty openstudio_version_ext
(= final release) is now handled correctly because:
- input default changed from '-rc1' to '' (so blank input stays blank)
- bash assignment EXT="${{ inputs.openstudio_version_ext }}" with no ||
fallback preserves the empty string in GITHUB_OUTPUT
Co-authored-by: Copilot <[email protected]>
…velop Previously the workflow triggered on all pushes AND pull_requests, causing every PR to show duplicate CI checks (one with '(push)' and one with '(pull_request)'). Restricting the push trigger to master/develop means: - PRs: CI runs once via pull_request event - Merges to master/develop: CI runs once via push event - Manual runs: workflow_dispatch still works as before Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR brings the workflow_dispatch trigger from master (PR #214) to the develop branch, enabling users to manually trigger OpenStudio .sif builds from the GitHub Actions UI.
Once merged, users can:
Benefits: