Skip to content

Commit 25a565b

Browse files
authored
chore: minor github actions cleanup/improvements (#416)
* fix: run actions on workflow changes * fix: don't try to push readme changes, fail if there are any Regenerating readme causing changes is checked by pre-commit hook. * fix: weekly dependabot for helm
1 parent bb46726 commit 25a565b

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ updates:
44
directory: ".github"
55
schedule:
66
interval: "weekly"
7+
- package-ecosystem: "helm"
8+
directory: "charts"
9+
schedule:
10+
interval: "weekly"
11+
# info: for anyone looking to use dependabot to update pre-commit hooks: https://github.com/dependabot/dependabot-core/issues/1524#issuecomment-2708625358

.github/workflows/lint-and-test.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- master
99
paths:
10+
- .github/**
1011
- charts/mailu/**
1112
# Allows you to run this workflow manually from the Actions tab
1213
workflow_dispatch:
@@ -75,10 +76,8 @@ jobs:
7576
if: steps.list-changed.outputs.changed == 'true'
7677
run: ct install --debug --config ct.yaml
7778

78-
update-readme-metadata:
79+
check-readme-update:
7980
runs-on: ubuntu-latest
80-
permissions:
81-
contents: write
8281
needs: lint-and-test
8382
steps:
8483
- name: Install readme-generator-for-helm
@@ -93,15 +92,7 @@ jobs:
9392
run: |
9493
echo "Updating README.md for mailu chart"
9594
readme-generator --values "charts/mailu/values.yaml" --readme "charts/mailu/README.md" --schema "/tmp/schema.json"
96-
97-
- name: Push changes
98-
run: |
99-
# Push all the changes
100-
cd charts
101-
git config --global user.email "[email protected]"
102-
git config --global user.name "Github actions"
103-
git add -A
104-
if ! git diff-index --quiet HEAD; then
105-
git commit -am "Update README.md with readme-generator-for-helm" --signoff
106-
git push
107-
fi
95+
git diff --exit-code --name-status charts/mailu/README.md || {
96+
echo "README update is missing. This should have been prevented by pre-commit hook."
97+
exit 1
98+
}

.github/workflows/trivy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- master
99
paths:
10+
- .github/**
1011
- charts/mailu/**
1112
push:
1213
branches:

0 commit comments

Comments
 (0)