Skip to content

Commit ae8ecae

Browse files
authored
Revert "feat(github-actions): narrow down path scope of build action (#356)" (#357)
This reverts commit 8dde343.
1 parent 8dde343 commit ae8ecae

File tree

2 files changed

+28
-44
lines changed

2 files changed

+28
-44
lines changed

template/.github/workflows/build.yml.j2

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

2420
env:
@@ -214,6 +210,34 @@ jobs:
214210
cache-all-crates: "true"
215211
- run: cargo test
216212

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+
217241
# This job cleans up the CRDs and Helm charts, followed by rebuilding them
218242
# It then runs a `git diff` and fails the entire workflow, if any difference is encountered.
219243
#

template/.github/workflows/check_readme.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)