-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (58 loc) · 2.33 KB
/
Copy pathrenovate.yml
File metadata and controls
68 lines (58 loc) · 2.33 KB
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
name: Renovate
on:
schedule:
- cron: '0 */2 * * *' # Every 2 hours
pull_request:
types: [closed]
branches: [main]
issues:
types: [edited]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
permissions:
contents: read
jobs:
renovate:
# Filter out noise: only run for schedule, manual dispatch, merged Renovate PRs,
# and human-edited issues (not bot updates to the Dependency Dashboard).
if: >-
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'renovate/')) ||
(github.event_name == 'issues' && github.event.sender.type != 'Bot' && github.event.issue.number == 1166)
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
id: app-token
with:
client-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Generate Renovate runner config
env:
REPOSITORY: ${{ github.repository }}
run: |
CONFIG_FILE="$GITHUB_WORKSPACE/.renovate-runner-config.json5"
cat > "$CONFIG_FILE" <<'EOF'
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
onboarding: false,
requireConfig: "optional",
allowedCommands: ["^pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile$", "^pnpm changeset:renovate .*$"],
EOF
echo " repositories: [\"$REPOSITORY\"]," >> "$CONFIG_FILE"
echo '}' >> "$CONFIG_FILE"
echo "Generated config:"
cat "$CONFIG_FILE"
- name: Self-hosted Renovate
uses: renovatebot/github-action@9fea9f0fbf80401026d11d03911d62b1f70fef1f # v46.3.3
with:
token: ${{ steps.app-token.outputs.token }}
configurationFile: .renovate-runner-config.json5
env:
GITHUB_COM_TOKEN: ${{ github.token }}
NODE_OPTIONS: '--max-old-space-size=4096'
LOG_LEVEL: ${{ github.event_name == 'workflow_dispatch' && 'debug' || 'info' }}