Skip to content

Commit

Permalink
chore(ci): added labeler action
Browse files Browse the repository at this point in the history
  • Loading branch information
kilip committed Aug 18, 2024
1 parent f7a1a9c commit d096fa6
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# Areas
area/docs:
- changed-files:
- any-glob-to-any-file:
- "docs/**/*"
- "README.md"
area/github:
- changed-files:
- any-glob-to-any-file: ".github/**/*"
area/preflight:
- changed-files:
- any-glob-to-any-file: "preflight/**/*"
area/service:
- changed-files:
- any-glob-to-any-file: "service/**/*"
area/workstation:
- changed-files:
- any-glob-to-any-file: "service/**/*"
35 changes: 35 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
# Areas
- name: area/docs
color: "0e8a16"
- name: area/github
color: "0e8a16"
- name: area/preflight
color: "0e8a16"
- name: area/service
color: "0e8a16"
- name: area/workstation
color: "ffc300"
# Renovate Types
- name: renovate/container
color: "027fa0"
- name: renovate/github-action
color: "027fa0"
- name: renovate/grafana-dashboard
color: "027fa0"
- name: renovate/github-release
color: "027fa0"
# Semantic Types
- name: type/digest
color: "ffeC19"
- name: type/patch
color: "ffeC19"
- name: type/minor
color: "ff9800"
- name: type/major
color: "f6412d"
# Uncategorized
- name: community
color: "370fb2"
- name: hold
color: "ee0701"
10 changes: 8 additions & 2 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
changelog:
exclude:
authors:
- renovate
authors: []
categories:
- title: 🏕 Features
labels:
- '*'
exclude:
labels:
- dependencies
3 changes: 2 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
":dependencyDashboard",
":semanticCommits",
":skipStatusChecks",
":timezone(Asia/Makassar)"
":timezone(Asia/Makassar)",
"github>kilip/homeplay//.github/renovate/labels.json5"
],
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
"regexManagers": [
Expand Down
33 changes: 33 additions & 0 deletions .github/renovate/labels.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchUpdateTypes": ["major"],
"labels": ["type/major"]
},
{
"matchUpdateTypes": ["minor"],
"labels": ["type/minor"]
},
{
"matchUpdateTypes": ["patch"],
"labels": ["type/patch"]
},
{
"matchUpdateTypes": ["digest"],
"labels": ["type/digest"]
},
{
"matchDatasources": ["docker"],
"addLabels": ["renovate/container"]
},
{
"matchDatasources": ["github-releases", "github-tags"],
"addLabels": ["renovate/github-release"]
},
{
"matchManagers": ["github-actions"],
"addLabels": ["renovate/github-action"]
}
]
}
30 changes: 30 additions & 0 deletions .github/workflows/label-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Label Sync"

on:
workflow_dispatch:
push:
branches: ["main"]
paths: [".github/labels.yaml"]
schedule:
- cron: "0 0 * * *" # Every day at midnight

permissions:
issues: write

jobs:
label-sync:
name: Label Sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: .github/labels.yaml

- name: Sync Labels
uses: EndBug/label-sync@v2
with:
config-file: .github/labels.yaml
delete-other-labels: true
21 changes: 21 additions & 0 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Labeler"

on:
workflow_dispatch:
pull_request_target:
branches: ["main"]

jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Labeler
uses: actions/labeler@v5
with:
configuration-path: .github/labeler.yaml

0 comments on commit d096fa6

Please sign in to comment.