-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): Add a bunch of boilerplate automation goodies (#540)
- Loading branch information
Showing
6 changed files
with
160 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
slackChannel: "#kingpin" |
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,21 @@ | ||
name-template: v$RESOLVED_VERSION | ||
tag-template: 'v$RESOLVED_VERSION' | ||
tag-prefix: 'v' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
template: | | ||
## Changes | ||
$CHANGES |
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,77 @@ | ||
name: pull-request-lint | ||
on: | ||
pull_request: | ||
types: | ||
- edited | ||
- labeled | ||
- opened | ||
- ready_for_review | ||
- reopened | ||
- synchronize | ||
branches-ignore: | ||
- production | ||
jobs: | ||
validate: | ||
name: Validate PR title | ||
runs-on: | ||
- runs-on=${{ github.run_id }} | ||
- runner=1cpu-linux-arm64 | ||
- extras=s3-cache | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
# Magic Cache | ||
- uses: runs-on/action@v1 | ||
|
||
# Check out the repo so that we can dynamically discover the available charts in the repo. | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
# Verify the PR title against the "types" and "scopes" we allow. | ||
# | ||
# https://github.com/amannn/action-semantic-pull-request#configuration | ||
- uses: amannn/[email protected] | ||
id: lint_pr_title | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
requireScope: true | ||
types: | | ||
chore | ||
docs | ||
feat | ||
fix | ||
refactor | ||
test | ||
scopes: | | ||
deps | ||
docs | ||
ci | ||
actors | ||
aws | ||
s3 | ||
iam | ||
cfn | ||
cloudformation | ||
group | ||
macro | ||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
if: always() && (steps.lint_pr_title.outputs.error_message != null) | ||
with: | ||
header: pr-title-lint-error | ||
message: | | ||
Hey there and thank you for opening this pull request! 👋🏼 | ||
We have changed the repository requirements to now use [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. | ||
Details: | ||
``` | ||
${{ steps.lint_pr_title.outputs.error_message }} | ||
``` | ||
# Delete a previous comment when the issue has been resolved | ||
- if: ${{ steps.lint_pr_title.outputs.error_message == null }} | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: pr-title-lint-error | ||
delete: true |
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,9 @@ | ||
name: release-drafter | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
drafter: | ||
uses: Nextdoor/.github/.github/workflows/release-drafter.yml@main | ||
secrets: inherit |
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,24 @@ | ||
# https://github.com/marketplace/actions/stale-branches | ||
name: Stale Branches | ||
|
||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: '0 6 * * 1-5' | ||
|
||
permissions: | ||
issues: write | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
stale_branches: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Stale Branches | ||
uses: crs-k/[email protected] | ||
with: | ||
days-before-stale: 21 | ||
days-before-delete: 28 | ||
tag-committer: true | ||
branches-filter-regex: '^((?!dependabot|production))' |
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 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:recommended", | ||
":prHourlyLimitNone", | ||
":prConcurrentLimitNone", | ||
":automergePr", | ||
":automergePatch", | ||
":automergeRequireAllStatusChecks" | ||
], | ||
"automerge": true, | ||
"automergeType": "pr", | ||
"platformAutomerge": true, | ||
"schedule": [ | ||
"before 5am on monday" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": [ "patch", "minor" ], | ||
"automerge": true | ||
}, | ||
{ | ||
"enabled": false, | ||
"matchDatasources": [ "docker" ], | ||
"matchPackageNames": [ "library/" ] | ||
} | ||
] | ||
} |