Fix container build workflows to checkout dispatch ref
When manually dispatching a container build with --ref, the build job now checks out the specified commit instead of the branch HEAD. This allows building containers from feature branches before merging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c70aff256a
commit
7641018c6a
4 changed files with 6 additions and 1 deletions
|
|
@ -53,6 +53,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
|
||||
- name: Check for default.nix
|
||||
id: check
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
|
||||
- name: Check for Dockerfile
|
||||
id: check
|
||||
|
|
|
|||
1
docs/changelog.d/+fix-container-build-ref.bugfix.md
Normal file
1
docs/changelog.d/+fix-container-build-ref.bugfix.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Container build workflows now checkout the dispatch ref when building from feature branches, fixing "No Dockerfile — skipping" errors for containers not yet on main.
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
# ///
|
||||
#MISE description="Trigger container build workflows via Forgejo API"
|
||||
#USAGE arg "<container>" help="Container name (directory under containers/)"
|
||||
#USAGE flag "--ref <ref>" help="Commit SHA to build (defaults to current HEAD)"
|
||||
#USAGE flag "--ref <ref>" help="Commit SHA or branch to build (defaults to current HEAD)"
|
||||
#USAGE flag "--dry-run" help="Show what would be done without triggering"
|
||||
"""Trigger container build workflows via Forgejo API dispatch.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue