Skip to content

Commit

Permalink
ci: Update Reusable Workflows (#17)
Browse files Browse the repository at this point in the history
* update renovate

* update label-sync

* update pr labeler

* add lint workflow

* specify version

* cleanup

* add commitlint config
  • Loading branch information
mircea-pavel-anton authored Oct 20, 2024
1 parent c78b994 commit 730524f
Show file tree
Hide file tree
Showing 13 changed files with 141 additions and 70 deletions.
46 changes: 46 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"rules": {
"type-enum": [
2,
"always",
[
"chore",
"ci",
"deps",
"feat",
"fix",
"patch",
"style"
]
],
"subject-empty": [
2,
"never"
],
"type-case": [
2,
"always",
"lower-case"
],
"subject-case": [
0
],
"type-empty": [
2,
"never"
],
"scope-case": [
2,
"always",
"lower-case"
],
"scope-enum": [
0
],
"header-max-length": [
2,
"always",
120
]
}
}
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions .github/renovate.json5

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:

jobs:
release:
uses: mirceanton/reusable-workflows/.github/workflows/docker-release.yaml@17d8ef4df857d93b905170956fbbcd56b296e8bb
uses: mirceanton/reusable-workflows/.github/workflows/docker-release.yaml@v3.4.19
secrets: inherit
with:
image: ghcr.io/${{ github.repository }}
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/label-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Label Sync

on:
# Manual Trigger
workflow_dispatch:
inputs:
dry-run:
description: Dry Run
default: true
required: false
type: boolean

# Dry Run on any PR that changes the labels config or the workflow
pull_request:
paths:
- .github/workflows/label-sync.yaml
- .github/labels.yaml

# "Wet" Run on any push to the main branch that changes the labels config or the workflow
push:
branches: ["main", "master"]
paths:
- .github/workflows/label-sync.yaml
- .github/labels.yaml

# "Wet" Run hourly
schedule:
- cron: "0 * * * *"

jobs:
label-sync:
uses: mirceanton/reusable-workflows/.github/workflows/reusable-label-sync.yaml@f4dce998a168bbe2e53664acf4dd29407cd3d29f # v3.4.19
secrets: inherit
with:
dry-run: ${{ inputs.dry-run || github.event_name == 'pull_request' }}
config-file: .github/labels.yaml
13 changes: 13 additions & 0 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Labeler

on:
pull_request_target: {}

jobs:
pr-labeler:
uses: mirceanton/reusable-workflows/.github/workflows/reusable-labeler.yaml@f4dce998a168bbe2e53664acf4dd29407cd3d29f # v3.4.19
secrets: inherit
with:
config-file: .github/labeler.yaml
19 changes: 19 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Lint

on:
# Manual Trigger
workflow_dispatch: {}

# Run on any PR
pull_request: {}

jobs:
actionlint:
uses: mirceanton/reusable-workflows/.github/workflows/reusable-actionlint.yaml@f4dce998a168bbe2e53664acf4dd29407cd3d29f # v3.4.19
secrets: inherit

commitlint:
uses: mirceanton/reusable-workflows/.github/workflows/reusable-commitlint.yaml@f4dce998a168bbe2e53664acf4dd29407cd3d29f # v3.4.19
secrets: inherit
34 changes: 0 additions & 34 deletions .github/workflows/meta-label-sync.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/meta-labeler.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/readme-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
run: pip install Jinja2

- name: Generate README
run: cd .github/scripts && python3 readme-generator.py
working-directory: .github/scripts
run: python3 readme-generator.py

- name: Show changes
run: cat README.md
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name: Renovate

on:
# Manual Trigger
workflow_dispatch:
inputs:
dry-run:
Expand All @@ -15,22 +16,26 @@ on:
default: debug
required: false
type: string

# Dry Run on any PR that changes the renovate config or the renovate workflow
pull_request:
paths:
- ".github/workflows/renovate.yaml"
- ".github/configs/renovate/*.json5"
- "renovate.json5"
- .github/workflows/renovate.yaml
- renovate.json5

# "Wet" Run hourly
schedule:
- cron: "0 * * * *" # hourly
- cron: "0 * * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

jobs:
renovate:
uses: mirceanton/reusable-workflows/.github/workflows/renovate.yaml@17d8ef4df857d93b905170956fbbcd56b296e8bb
uses: mirceanton/reusable-workflows/.github/workflows/reusable-renovate.yaml@f4dce998a168bbe2e53664acf4dd29407cd3d29f # v3.4.19
secrets: inherit
with:
dry-run: "${{ inputs.dry-run == true || github.event_name == 'pull_request' }}"
log-level: "${{ inputs.log-level || 'debug' }}"
config-file: "renovate.json5"
12 changes: 12 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
"extends": [
":dependencyDashboard",
"config:best-practices",
":disableRateLimiting",
":semanticCommits",
"github>mirceanton/renovate-config//labels/all.json5",
"github>mirceanton/renovate-config//semantic-commits/all.json5"
]
}

0 comments on commit 730524f

Please sign in to comment.