-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds dependency management using renovate (#2)
- Loading branch information
1 parent
75c0201
commit 7da9825
Showing
4 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules/* | ||
**/package.json | ||
**/dist/**/* | ||
**/coverage/* | ||
**/coverage/* | ||
renovate-config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Renovate Pull Request Approval | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
# Increase the access for the GITHUB_TOKEN | ||
permissions: | ||
# This Allows the GITHUB_TOKEN to approve pull requests | ||
pull-requests: write | ||
# This Allows the GITHUB_TOKEN to auto merge pull requests | ||
contents: write | ||
|
||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
# By default, GitHub Actions workflows triggered by renovate get a GITHUB_TOKEN with read-only permissions. | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
jobs: | ||
approve_renovate_pull_requests: | ||
runs-on: ubuntu-latest | ||
name: Approve renovate pull request | ||
if: ${{ (github.actor == 'Octobob') && (contains(github.head_ref, 'renovate')) }} | ||
steps: | ||
- name: Approve a renovate created PR | ||
run: gh pr review --approve "$PR_URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Renovate | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
type: boolean | ||
required: false | ||
default: false | ||
description: Dry run (don't create PRs) | ||
|
||
jobs: | ||
renovate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Self-hosted Renovate | ||
uses: renovatebot/[email protected] | ||
with: | ||
configurationFile: renovate-config.js | ||
token: ${{ secrets.RENOVATE_GITHUB_TOKEN }} | ||
env: | ||
LOG_LEVEL: debug | ||
RENOVATE_DRY_RUN: ${{ inputs.dryRun && 'full' || null }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = { | ||
extends: [ | ||
"config:base", | ||
":disableMajorUpdates", | ||
":ignoreModulesAndTests", | ||
":pinVersions", | ||
":rebaseStalePrs", | ||
":automergeDigest", | ||
":automergePatch", | ||
":automergePr", | ||
":automergeRequireAllStatusChecks", | ||
":automergeLinters", | ||
":automergeTesters", | ||
":automergeTypes", | ||
"packages:eslint", | ||
"workarounds:typesNodeVersioning", | ||
"github>whitesource/merge-confidence:beta", | ||
], | ||
branchPrefix: "renovate/", | ||
platform: "github", | ||
repositories: ["OctopusDeploy/login"], | ||
packageRules: [], | ||
timezone: "Australia/Brisbane", | ||
onboarding: false, | ||
requireConfig: false, | ||
allowedPostUpgradeCommands: [".*"], | ||
postUpgradeTasks: { | ||
commands: ["npm install && npm run build"], | ||
fileFilters: ["**/index.js"], | ||
executionMode: "update", | ||
}, | ||
}; |