generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.6 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
name: Renovate
# Run on pull requests, cronjob or manually (dispatch)
on:
pull_request:
schedule:
- cron: "0 11 * * *" # 3 AM PST = 11 AM UDT
workflow_dispatch:
inputs:
repo: # Optional input
description: org/repo override (optional)
type: string
required: false
# Cancel any other workflows (PR, cron or manual)
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
# Variables
env:
config: renovate.json
pr_set: '["bcgov/nr-renovate", "bcgov/quickstart-openshift"]'
jobs:
Renovate:
permissions:
pull-requests: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# PRs - dry run and a small number of repos
- name: Config for pull requests
if: github.event_name == 'pull_request'
run: |
# Dry run and short repo list
cat <<< $(jq '.+= {"dryRun": "full"}' ${{ env.config }}) > ${{ env.config }}
cat <<< $(jq '. | .repositories = ${{ env.pr_set }}' ${{ env.config }}) > ${{ env.config }}
cat ${{ env.config }} | jq .repositories
# workflow_dispatch - optionally just one repo
- name: Config for manual workflows (optional)
if: inputs.repo
run: |
# Set target repo
cat <<< $(jq '. | .repositories = ["${{ inputs.repo }}"]' ${{ env.config }}) > ${{ env.config }}
cat ${{ env.config }} | jq .repositories
# Run Renovate
- name: Run Renovate
uses: renovatebot/[email protected]
with:
configurationFile: ${{ env.config }}
token: ${{ secrets.RENOVATE_TOKEN }}