Skip to content

feat: add workflow_dispatch for on-demand .sif builds and update to ubuntu-24.04#214

Merged
anchapin merged 7 commits into
masterfrom
image-tag-logic
May 18, 2026
Merged

feat: add workflow_dispatch for on-demand .sif builds and update to ubuntu-24.04#214
anchapin merged 7 commits into
masterfrom
image-tag-logic

Conversation

@anchapin
Copy link
Copy Markdown
Collaborator

Summary

This PR adds the ability to manually trigger Apptainer .sif builds for any OpenStudio version via workflow_dispatch, and includes previously-ready ubuntu-24.04 and image tag logic updates.

Changes

Workflow dispatch for on-demand .sif builds (docker-openstudio.yml)

  • Added workflow_dispatch trigger with inputs:
    • openstudio_version — e.g. 3.10.0
    • openstudio_sha — git SHA for the release
    • openstudio_version_ext — e.g. -rc1, or blank for a final release
    • apptainer_only — skip docker build/test and pull directly from an existing Docker Hub image
  • Added a setup job that resolves version inputs via GITHUB_OUTPUT, fixing a subtle GitHub Actions bug where empty string inputs (needed for final releases with no version extension) were silently replaced by the input's default: value before bash ran. Using GITHUB_OUTPUT instead of GITHUB_ENV and avoiding the || operator for the ext variable ensures empty string is preserved correctly.
  • docker and apptainer jobs now consume resolved versions from needs.setup.outputs
  • apptainer job now runs on workflow_dispatch events in addition to pushes to master/develop

ubuntu-24.04 runner update and image tag logic

  • Updated runners from ubuntu-22.04 to ubuntu-24.04
  • Refined Docker image tag logic in manual_installer_test.yml and deploy_docker.sh

Motivation

The 3.10.0 final release .sif was never uploaded to S3 because the CI run on the release commit failed. This workflow change allows backfilling missed releases without touching master/develop directly.

anchapin and others added 7 commits December 31, 2025 12:54
…_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 <223556219+Copilot@users.noreply.github.com>
…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 <223556219+Copilot@users.noreply.github.com>
…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 <223556219+Copilot@users.noreply.github.com>
@anchapin anchapin merged commit bc3fb49 into master May 18, 2026
3 checks passed
@anchapin anchapin deleted the image-tag-logic branch May 18, 2026 19:38
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