Skip to content

Commit 3465713

Browse files
committed
Generated commit to update templated files based on rev 8dde343 in stackabletech/operator-templating repo.
Triggered by: Manual run triggered by: fhennig with message [feat(github-actions): split off README check and narrow scope for build.yml]
1 parent 20f3e53 commit 3465713

File tree

4 files changed

+54
-32
lines changed

4 files changed

+54
-32
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
tags:
1616
- '[0-9][0-9].[0-9]+.[0-9]+'
1717
pull_request:
18+
paths-ignore:
19+
- 'docs/**'
20+
- '.readme/**'
21+
- '*.md'
1822
merge_group:
1923

2024
env:
@@ -210,34 +214,6 @@ jobs:
210214
cache-all-crates: "true"
211215
- run: cargo test
212216

213-
214-
# Similar to check_charts, this tries to render the README, and see if there are unintended changes.
215-
# This will save us from merging changes to the wrong file (instead of the templated source), and from
216-
# forgetting to render out modifications to the README.
217-
check_readme:
218-
name: Check if committed README is the one we would render from the available parts
219-
runs-on: ubuntu-latest
220-
steps:
221-
- name: Checkout
222-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
223-
with:
224-
submodules: recursive
225-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # tag=v5.0.0
226-
with:
227-
python-version: '3.11'
228-
- name: Install jinja2-cli
229-
run: pip install jinja2-cli==0.8.2
230-
- name: Regenerate charts
231-
run: make render-readme
232-
- name: Check if committed README were up to date
233-
run: git diff --exit-code
234-
- name: Git Diff showed uncommitted changes
235-
if: ${{ failure() }}
236-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
237-
with:
238-
script: |
239-
core.setFailed('Committed README are not up to date, please make sure to apply them to the templated partials, and re-commit!')
240-
241217
# This job cleans up the CRDs and Helm charts, followed by rebuilding them
242218
# It then runs a `git diff` and fails the entire workflow, if any difference is encountered.
243219
#
@@ -373,7 +349,7 @@ jobs:
373349
steps:
374350
- name: Install preflight
375351
run: |
376-
wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.7.2/preflight-linux-amd64
352+
wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.9.1/preflight-linux-amd64
377353
chmod +x preflight-linux-amd64
378354
- name: Check container
379355
run: ./preflight-linux-amd64 check container "$IMAGE_TAG" > preflight.out

.github/workflows/check_readme.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# =============
2+
# This file is automatically generated from the templates in stackabletech/operator-templating
3+
# DON'T MANUALLY EDIT THIS FILE
4+
# =============
5+
# Similar to check_charts, this tries to render the README, and see if there are unintended changes.
6+
# This will save us from merging changes to the wrong file (instead of the templated source), and from
7+
# forgetting to render out modifications to the README.
8+
---
9+
name: Check README
10+
11+
on:
12+
pull_request:
13+
paths:
14+
- '.readme/**'
15+
- 'README.md'
16+
17+
jobs:
18+
check_readme:
19+
name: Check if committed README is the one we would render from the available parts
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
24+
with:
25+
submodules: recursive
26+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # tag=v5.0.0
27+
with:
28+
python-version: '3.11'
29+
- name: Install jinja2-cli
30+
run: pip install jinja2-cli==0.8.2
31+
- name: Regenerate charts
32+
run: make render-readme
33+
- name: Check if committed README were up to date
34+
run: git diff --exit-code
35+
- name: Git Diff showed uncommitted changes
36+
if: ${{ failure() }}
37+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
38+
with:
39+
script: |
40+
core.setFailed('Committed README are not up to date, please make sure to apply them to the templated partials, and re-commit!')

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,15 @@ build: regenerate-charts regenerate-nix helm-package docker-build
150150

151151
publish: docker-publish helm-publish
152152

153-
run-dev:
153+
check-nix:
154+
@which nix || (echo "Error: 'nix' is not installed. Please install it to proceed."; exit 1)
155+
156+
check-kubernetes:
157+
@kubectl cluster-info > /dev/null 2>&1 || (echo "Error: Kubernetes is not running or kubectl is not properly configured."; exit 1)
158+
159+
run-dev: check-nix check-kubernetes
154160
kubectl apply -f deploy/stackable-operators-ns.yaml
155161
nix run -f. tilt -- up --port 5430 --namespace stackable-operators
156162

157-
stop-dev:
163+
stop-dev: check-nix check-kubernetes
158164
nix run -f. tilt -- down

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"after 5:00 and before 6:00 every weekday"
2929
]
3030
},
31-
"ignorePaths": [".github/workflows/build.yml", ".github/workflows/general_daily_security.yml", ".github/workflows/pr_reviewdog.yaml"]
31+
"ignorePaths": [".github/workflows/build.yml", ".github/workflows/check_readme.yml", ".github/workflows/general_daily_security.yml", ".github/workflows/pr_reviewdog.yaml"]
3232
}

0 commit comments

Comments
 (0)