Skip to content

Commit f1baac9

Browse files
authored
fix(ci): skip no-commit-to-branch in CI (#3)
Hotfix for the post-merge build of #2. The buildah workflow runs pre-commit on every push to main. The bundled `no-commit-to-branch` hook (in this repo's own `.pre-commit-config.yaml`) is intended to block interactive commits to `main`, not CI runs of pushes that already exist on main. With no `SKIP` env, the hook fails and the post-merge image build/push to ghcr never happens. This adds `SKIP: no-commit-to-branch` to the pre-commit step — same pattern `shared-workflows/.github/workflows/opentofu.yml` already uses.
1 parent 1ad6979 commit f1baac9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/buildah.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ jobs:
7878

7979
- name: Run pre-commit
8080
uses: pre-commit/action@v3.0.1
81+
env:
82+
SKIP: no-commit-to-branch
8183

8284
- name: Build image
8385
uses: redhat-actions/buildah-build@v2

0 commit comments

Comments
 (0)