Skip to content

Commit de6d5f6

Browse files
committed
fix(ci): pin kwctl-installer and add manifest check
Pin the kwctl-installer GitHub Action to v4.6.1 for reproducible e2e test environments. Add a CI step that runs 'make manifests' and verifies the generated chart files are up to date. Fix autolabeler workflow permissions to use job-level scoping. Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com> Assited-by: Github Copilot
1 parent 4c0a2bf commit de6d5f6

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

.github/workflows/autolabeler.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Auto label
22

33
on:
44
pull_request:
5+
# Only following types are handled by the action, but one can default to all as well
56
types: [opened, reopened, synchronize, edited]
67

78
permissions: {}
@@ -11,8 +12,8 @@ jobs:
1112
# Skip fork PRs — the GITHUB_TOKEN is read-only and cannot add labels
1213
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
1314
permissions:
14-
pull-requests: write
1515
contents: read
16+
pull-requests: write
1617
runs-on: ubuntu-latest
1718
steps:
1819
- uses: release-drafter/release-drafter/autolabeler@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7.1.1

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,14 +462,31 @@ jobs:
462462
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
463463
with:
464464
persist-credentials: false
465-
466465
- name: enable git long paths on Windows
467466
if: matrix.os == 'windows-latest'
468467
run: git config --global core.longpaths true
469468

470469
- name: Run cargo check
471470
run: make -C crates/kwctl check
472471

472+
check-manifests:
473+
name: Check if the controller-gen generated manifests are up to date
474+
runs-on: ubuntu-latest
475+
steps:
476+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
477+
with:
478+
persist-credentials: false
479+
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
480+
with:
481+
go-version: "1.26"
482+
check-latest: true
483+
- run: |
484+
make manifests
485+
if ! git diff --quiet -- charts/; then
486+
echo "Changes detected in charts/. Please run 'make manifests' and commit the changes."
487+
exit 1
488+
fi
489+
473490
# Rollup job for branch protection - single stable job name that depends on all checks
474491
ci-success:
475492
name: CI Success
@@ -496,6 +513,7 @@ jobs:
496513
- validate-hauler-manifest
497514
- kwctl-docs
498515
- check-kwctl-cross-platform
516+
- check-manifests
499517
runs-on: ubuntu-latest
500518
steps:
501519
- name: Check all jobs status

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
persist-credentials: false
103103

104104
- name: "Install kwctl"
105-
uses: kubewarden/github-actions/kwctl-installer@f301a7874dd642510fff54a89e4329881bf871ef # v4.6.0
105+
uses: kubewarden/github-actions/kwctl-installer@a03315e95ccf85c92e5d472824edeab0704f857b # v4.6.1
106106
with:
107107
KWCTL_VERSION: latest
108108

0 commit comments

Comments
 (0)