ci: fix Chore/add renovate (#35)
* ci: add Renovate for automated dependency updates * fix github action version * fix: prevent pre-push protect-main hook from hanging on stdin read
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run Renovate
|
- name: Run Renovate
|
||||||
uses: renovatebot/github-action@v42.1.0
|
uses: renovatebot/github-action@v46.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: renovate.json5
|
configurationFile: renovate.json5
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|||||||
+5
-6
@@ -33,12 +33,11 @@ pre-push:
|
|||||||
commands:
|
commands:
|
||||||
protect-main:
|
protect-main:
|
||||||
run: |
|
run: |
|
||||||
while read local_ref local_sha remote_ref remote_sha; do
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
if [ "$remote_ref" = "refs/heads/main" ]; then
|
if [ "$branch" = "main" ]; then
|
||||||
echo "Direct push to main is not allowed. Use a pull request instead."
|
echo "Direct push to main is not allowed. Use a pull request instead."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
skip:
|
skip:
|
||||||
- merge
|
- merge
|
||||||
- rebase
|
- rebase
|
||||||
|
|||||||
Reference in New Issue
Block a user