Skip to content

Commit c8ee378

Browse files
committed
Fix Renovate
1 parent b91ff34 commit c8ee378

4 files changed

Lines changed: 118 additions & 12 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: CI Tests
22

33
on: [push]
44

5+
concurrency:
6+
group: ci-${{ github.ref_name }}
7+
cancel-in-progress: true
8+
59
jobs:
610
build-verify:
711
runs-on: ubuntu-latest
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Update dependency verification
2+
3+
# Regenerates Gradle dependency verification on Renovate branches and pushes
4+
# the result. Uses RENOVATE_PUSH_TOKEN (not GITHUB_TOKEN) so the follow-up
5+
# push can trigger CI Tests. Create a fine-grained PAT (or GitHub App token)
6+
# with contents:write on this repo and store it as that secret.
7+
on:
8+
push:
9+
branches:
10+
- 'renovate/**'
11+
paths-ignore:
12+
- 'gradle/verification-metadata.xml'
13+
- 'gradle/verification-keyring.keys'
14+
- 'gradle/verification-keyring.gpg'
15+
16+
concurrency:
17+
group: update-dep-verification-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: write
22+
23+
jobs:
24+
update:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Require RENOVATE_PUSH_TOKEN
28+
env:
29+
RENOVATE_PUSH_TOKEN: ${{ secrets.RENOVATE_PUSH_TOKEN }}
30+
run: |
31+
if [ -z "$RENOVATE_PUSH_TOKEN" ]; then
32+
echo "::error::Repository secret RENOVATE_PUSH_TOKEN is required so verification commits can trigger CI. Create a fine-grained PAT with Contents: Read and write for this repository."
33+
exit 1
34+
fi
35+
36+
- uses: actions/checkout@v7
37+
with:
38+
fetch-depth: 0
39+
ref: ${{ github.ref_name }}
40+
token: ${{ secrets.RENOVATE_PUSH_TOKEN }}
41+
42+
- name: Set up JDK 17
43+
uses: actions/setup-java@v5
44+
with:
45+
java-version: '17'
46+
distribution: 'zulu'
47+
48+
- name: Grant execute permission for gradlew
49+
run: chmod +x gradlew
50+
51+
- name: Regenerate dependency verification metadata
52+
run: ./gradlew --write-verification-metadata pgp,sha256 --export-keys help
53+
54+
- name: Commit and push verification updates
55+
run: |
56+
git config user.name "github-actions[bot]"
57+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
58+
git add \
59+
gradle/verification-metadata.xml \
60+
gradle/verification-keyring.keys \
61+
gradle/verification-keyring.gpg
62+
if git diff --staged --quiet; then
63+
echo "No verification metadata changes"
64+
exit 0
65+
fi
66+
git commit -m "chore: update dependency verification metadata"
67+
git push

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ rundeck-cli-VERS-all.jar (shadowed jar)
5858

5959
## Update Dependency Verification
6060

61-
Dependency verification is automatically updated by Renovate when dependencies change.
61+
Dependency verification is automatically updated on Renovate branches by the
62+
`Update dependency verification` GitHub Actions workflow. That workflow needs a
63+
repository secret `RENOVATE_PUSH_TOKEN` (fine-grained PAT with Contents read/write)
64+
so its commit can trigger CI.
6265

6366
**If you manually update a dependency**, you must regenerate verification metadata:
6467

renovate.json

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
11
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
23
"extends": [
34
"config:recommended"
45
],
5-
"postUpgradeTasks": {
6-
"commands": [
7-
"./gradlew --write-verification-metadata pgp,sha256 --export-keys help"
8-
],
9-
"fileFilters": [
10-
"gradle/verification-metadata.xml",
11-
"gradle/verification-keyring.keys"
12-
]
13-
},
14-
"allowedCommands": [
15-
"^./gradlew --write-verification-metadata pgp,sha256 --export-keys help$"
6+
"minimumReleaseAge": "7 days",
7+
"dependencyDashboard": true,
8+
"packageRules": [
9+
{
10+
"description": "Defer major updates to manual selection from the Dependency Dashboard",
11+
"matchUpdateTypes": ["major"],
12+
"dependencyDashboardApproval": true
13+
},
14+
{
15+
"description": "Group low-risk GitHub Actions updates",
16+
"matchManagers": ["github-actions"],
17+
"groupName": "github actions"
18+
},
19+
{
20+
"description": "Spock's version suffix encodes the Groovy variant; review lockstep with groovy",
21+
"matchPackageNames": ["/^org\\.spockframework:/"],
22+
"groupName": "spock (manual review - groovy variant)",
23+
"dependencyDashboardApproval": true
24+
},
25+
{
26+
"description": "Group routine Gradle minor/patch dependency bumps",
27+
"matchManagers": ["gradle"],
28+
"matchUpdateTypes": ["minor", "patch"],
29+
"groupName": "gradle minor/patch dependencies"
30+
},
31+
{
32+
"description": "org.rundeck artifacts also need the Sonatype Central snapshots feed",
33+
"matchPackageNames": ["/^org\\.rundeck[.:]/"],
34+
"registryUrls": [
35+
"https://repo1.maven.org/maven2/",
36+
"https://central.sonatype.com/repository/maven-snapshots/"
37+
]
38+
},
39+
{
40+
"description": "Gradle plugin marker artifacts resolve via the Gradle Plugin Portal",
41+
"matchManagers": ["gradle"],
42+
"matchDepTypes": ["plugin"],
43+
"registryUrls": [
44+
"https://plugins.gradle.org/m2/",
45+
"https://repo1.maven.org/maven2/"
46+
]
47+
}
1648
]
1749
}

0 commit comments

Comments
 (0)