diff --git a/.forgejo/workflows/build-container-nix.yaml b/.forgejo/workflows/build-container-nix.yaml index d3ef2bf..f095881 100644 --- a/.forgejo/workflows/build-container-nix.yaml +++ b/.forgejo/workflows/build-container-nix.yaml @@ -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 diff --git a/.forgejo/workflows/build-container.yaml b/.forgejo/workflows/build-container.yaml index 0fdbaba..bc682c5 100644 --- a/.forgejo/workflows/build-container.yaml +++ b/.forgejo/workflows/build-container.yaml @@ -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 diff --git a/docs/changelog.d/+fix-container-build-ref.bugfix.md b/docs/changelog.d/+fix-container-build-ref.bugfix.md new file mode 100644 index 0000000..d4295f4 --- /dev/null +++ b/docs/changelog.d/+fix-container-build-ref.bugfix.md @@ -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. diff --git a/mise-tasks/container-build-and-release b/mise-tasks/container-build-and-release index 885a102..b162ab4 100755 --- a/mise-tasks/container-build-and-release +++ b/mise-tasks/container-build-and-release @@ -5,7 +5,7 @@ # /// #MISE description="Trigger container build workflows via Forgejo API" #USAGE arg "" help="Container name (directory under containers/)" -#USAGE flag "--ref " help="Commit SHA to build (defaults to current HEAD)" +#USAGE flag "--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.