Skip to content

feat: merge workflow_dispatch trigger to develop branch#215

Merged
anchapin merged 5 commits into
developfrom
image-tag-logic
Jun 18, 2026
Merged

feat: merge workflow_dispatch trigger to develop branch#215
anchapin merged 5 commits into
developfrom
image-tag-logic

Conversation

@anchapin

Copy link
Copy Markdown
Collaborator

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:

  1. Visit the GitHub Actions tab
  2. Click 'Run workflow'
  3. Specify OpenStudio version, SHA, and build options
  4. Get .sif artifacts without modifying code

Benefits:

  • Easy per-version .sif builds for HPC/Singularity deployments
  • Integrates with OSimFlow campaigns
  • No need for local apptainer installations

anchapin and others added 5 commits May 18, 2026 14:38
…_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]>
@anchapin
anchapin merged commit 30a6da8 into develop Jun 18, 2026
6 checks passed
@anchapin
anchapin deleted the image-tag-logic branch June 18, 2026 19:47
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.

1 participant