-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.44 KB
/
renovate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Renovate
on:
# Temporarily enable manual workflow trigger for testing
workflow_dispatch: {}
schedule:
- cron: "5 2 * * *"
jobs:
renovate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Renovate
shell: bash
run: npx renovate
env:
RENOVATE_CONFIG_FILE: "renovate.json"
LOG_FILE: renovate.log
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
LOG_LEVEL: "debug"
# Ensure the output does not contain a line starting with "No repositories found"
- name: Validate renovate output
shell: bash
run: cat renovate.log | jq --slurp -e 'any(.[].msg; test("^No repositories found")) | not'
# Slack application: https://api.slack.com/apps/A07LL1CS2N4/general
- name: Send notifications
if: failure() && github.event_name == 'schedule'
shell: pwsh
run: |
Invoke-RestMethod `
-Uri ${{ secrets.SLACK_WEBHOOK }} `
-Headers @{ "Content-Type" = "application/json" } `
-Method Post `
-Body @"
{
"text": "The GitHub Renovate pipelines failed. Please check the logs: https://github.com/gsoft-inc/wl-reusable-workflows/actions/runs/${{github.run_id}}"
}
"@