-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (64 loc) · 1.78 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Renovate
on:
schedule:
- cron: '13 */8 * * *'
workflow_dispatch:
inputs:
dry-run:
description: 'Dry run'
required: false
default: 'false'
concurrency:
group: renovate
jobs:
renovate:
runs-on: ubuntu-24.04
permissions: write-all
steps:
- name: Self-hosted Renovate
env:
LOG_LEVEL: debug
RENOVATE_TOKEN: ${{ secrets.BOT_RENOVATE }}
run: |
docker run --interactive --rm \
--env LOG_LEVEL \
--env RENOVATE_TOKEN \
renovate/renovate:latest \
--dry-run=${{ inputs.dry-run }} \
"${GITHUB_REPOSITORY}"
check-log:
runs-on: ubuntu-24.04
needs:
- renovate
if: always()
env:
GITHUB_TOKEN: ${{ secrets.BOT_RENOVATE }}
steps:
- name: Fetch log
run: |
echo "### Processing run id ${{ github.run_id }}"
JOB_ID="$(
curl --url https://api.github.com/repos/uniget-org/tools/actions/runs/${{ github.run_id }}/jobs \
--silent \
--location \
--fail \
--header "Authorization: Bearer ${{ secrets.BOT_RENOVATE }}" \
| jq '.jobs[] | select(.name == "renovate") | .id'
)"
echo "### Fetching log for job id ${JOB_ID}"
curl --url https://api.github.com/repos/uniget-org/tools/actions/jobs/${JOB_ID}/logs \
--silent \
--location \
--fail \
--header "Authorization: Bearer ${{ secrets.BOT_RENOVATE }}" \
>job.log
- name: Store logs
uses: actions/upload-artifact@v4
with:
name: logs.zip
path: "job.log"
- name: Check log
run: |
if grep secondary job.log; then
exit 1
fi