Skip to content

Commit

Permalink
chore: versioning (#1293)
Browse files Browse the repository at this point in the history
* chore: versioning

* feat: switch to renovate

* fix: yaml files

* chore: yaml
  • Loading branch information
adamdehaven authored Sep 7, 2023
1 parent 377e7a2 commit 7f6f439
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 50 deletions.
37 changes: 0 additions & 37 deletions .github/dependabot.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Dependabot auto-merge
name: Renovate Bot dependency updates auto-merge

permissions:
pull-requests: write
Expand All @@ -8,19 +8,13 @@ permissions:
on: pull_request_target

jobs:
dependabot-automerge:
renovate-autoapprove:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: ${{ github.actor == 'renovate[bot]' }}
steps:
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
# Use the bot account PAT to allow auto-approve and merge the PRs
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }}

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
commitlint:
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'flycode-app[bot]' }}
if: ${{ github.actor != 'renovate[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Publish

on:
push:
branches: [main]
branches:
- main
- alpha
- beta

jobs:
run-tests:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Tests

on:
pull_request:
branches: [main]
branches:
- main
- alpha
- beta

# Allow workflow to be called by another workflow
workflow_call:
# Must define secrets here so that the calling workflow can pass in the NPM_TOKEN needed to install private packages.
Expand Down Expand Up @@ -67,7 +71,8 @@ jobs:

- name: Publish package preview
id: package-preview
if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }}
# Do not run for `alpha` or `beta` branches
if: github.event_name == 'pull_request' && github.actor != 'renovate[bot]' && !contains(github.head_ref || github.ref_name, 'alpha') && !contains(github.head_ref || github.ref_name, 'beta')
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }}
run: |
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ module.exports = {
rules: {
'header-max-length': [2, 'always', 108],
},
ignores: [(message) => /^chore\(release\): .+$/m.test(message)],
}
File renamed without changes.
56 changes: 56 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":semanticCommits",
":automergeRequireAllStatusChecks",
":automergePatch",
":automergeMinor"
],
"baseBranches": [
"main"
],
"dependencyDashboard": true,
"rangeStrategy": "bump",
"platformAutomerge": true,
"labels": [
"dependencies",
"renovate-bot"
],
"schedule": [
"every weekday"
],
"timezone": "America/New_York",
"automergeSchedule": [
"every weekday"
],
"npmrcMerge": true,
"encrypted": {
"npmToken": "wcFMA/xDdHCJBTolAQ//XFopBP9S7JuWKQTwVozdJvlVb+riW/S+U84WkQf66rxeJAqSnM3WgOK5PszWD7a84zb6FpOsr1YZTwVXBmkZBsQGQ4XUGCM+42Fs2etKSQHfUCLLGO3HDMAnz0s1Y2F3U6TbZzb2nsXwSNwyXHKSC6jK+wRvmUMs1z4uSQjhsldlb1q358oiIY7DSS2x9HzplltxSFeV2TfJdq3/AEwgPAJuaAV1+cAxiFAP2hwCY7goOTSx0OC39LHApiZgCoEJPYgdIbOtLyu5qmExenu1JUBNrt+3SNN9p7vXZiNcFcdIkZHoDmlwWdMyxOupqoxBvvlzTIVqqz16LA2k1s1P6e9SigKLv470v5KmnyMiXOk0h0GrR+fMnrq6GveZ7R9PToek1yRCwX4SAeAzLABFz4F3O2UXXQqQG/Q6SxmaGOcidIDEdXvbJ3NIcYbwPhPg0X12/vvFdDQpeSTJlOVlsy0+WIyENkfjtHN7WshzqTy2tGGacZWKeK7+qbjJAV7hKw366UlKhDHDSyRCa6zaHIIujEB/JKNgjhb/wiNy8LWzxyFhA8m/djjvnFlldzod+VbR3gM5aW1LXEEAlgzy3gfDQu0QaAhliqw5+Bx36zB20NXKTVcqZYKoa12p8mFoxGZmtMcunw0ZYHFQY6Ml+Yi4w81fMSwJh8OSYPVE0kLSbwE5f2wH72CFWu9XW4+y7yPhHhff+GRnmDkkyJSX8F4XI+OQJhNMJX0sJmO2X/RiKfz0IOLVP3YMj/NT9CUmdcAdyljjmvD1z9yZ/GNoe4XRa1I9kDN5SM782yJ8mlQlzxMX3JBaoyj5vz5GIKZdsg"
},
"stabilityDays": 14,
"packageRules": [
{
"matchPackagePatterns": [
"^@kong\/",
"^@kong-ui\/",
"^@kong-ui-public\/"
],
"stabilityDays": 0
},
{
"automerge": true,
"groupName": "all non-major dependencies with stable version",
"groupSlug": "all-minor-patch",
"matchCurrentVersion": "!/^0/",
"matchPackagePatterns": [
"*"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"stabilityDays": 10
}
]
}

0 comments on commit 7f6f439

Please sign in to comment.