diff --git a/.github/workflows/renovate-approve.yaml b/.github/workflows/renovate-approve.yaml new file mode 100644 index 00000000..c70e7910 --- /dev/null +++ b/.github/workflows/renovate-approve.yaml @@ -0,0 +1,18 @@ +name: renovate-approve +run-name: CI for approving renovate PRs + +on: + push: + branches: + - "renovate/**" + +jobs: + autoapprove: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Approve PR + run: | + gh pr review --approve || true + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml new file mode 100644 index 00000000..cf772756 --- /dev/null +++ b/.github/workflows/renovate.yaml @@ -0,0 +1,18 @@ +# workflow for checking package versions and opening PRs to bump +name: Renovate +on: + workflow_dispatch: + workflow_call: + +jobs: + renovate: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Self-hosted Renovate + uses: renovatebot/github-action@23a02fe7be9e93f857a953cc8162e57d2c8401ef # v39.0.1 + with: + configurationFile: renovate-config.js + token: ${{ secrets.PAT_TOKEN }} diff --git a/renovate-config.js b/renovate-config.js new file mode 100644 index 00000000..17faa303 --- /dev/null +++ b/renovate-config.js @@ -0,0 +1,10 @@ +module.exports = { + branchPrefix: 'renovate/', + dryRun: null, + username: 'renovate-release', + gitAuthor: 'Renovate Bot ', + onboarding: true, + platform: 'github', + includeForks: true, + repositories: ['canonical/hydra-rock'], +} diff --git a/renovate.json b/renovate.json index 1927fea7..9e699d7f 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,17 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:base" - ] + "config:base", + ":disableDependencyDashboard", + ":automergeDigest", + ":automergePatch", + ":automergeMinor", + ":rebaseStalePrs", + ":semanticCommits", + ":semanticCommitScope(deps)", + "helpers:pinGitHubActionDigests" + ], + "automergeType": "pr", + "rebaseWhen": "behind-base-branch", + "automerge": true } \ No newline at end of file