Skip to content

Commit

Permalink
chore: Simplify CI setup and group dependabot updates (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
borchero authored Apr 7, 2024
1 parent 1b22129 commit de436c3
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 70 deletions.
24 changes: 4 additions & 20 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
<!-- Please provide an expressive pull request title as it will be listed in the release notes. -->
# Motivation

## Motivation
<!-- Why is this change necessary? Link issues here if applicable. -->

<!-- What is the motivation behind this pull request? -->
# Changes

<!-- If there exists an issue that is resolved with this pull request, please link it here. If the
motivation is already lined out in the issue, linking the issue suffices. -->

## Explanation

<!-- How does this pull request attempt to solve the issue outlined in the motivation? -->

## Changes

<!-- Please list a summary of your changes. -->

## Checklist

<!-- Please make sure that you took care of the following: -->

- [ ] I added relevant tests
- [ ] I have updated the documentation if necessary
<!-- What changes have been performed? -->
15 changes: 12 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ updates:
package-ecosystem: github-actions
schedule:
interval: monthly
day: saturday
groups:
ci-dependencies:
patterns:
- "*"
commit-message:
prefix: ci
labels:
Expand All @@ -15,7 +18,10 @@ updates:
package-ecosystem: gomod
schedule:
interval: monthly
day: saturday
groups:
go-dependencies:
patterns:
- "*"
commit-message:
prefix: build(go)
labels:
Expand All @@ -25,7 +31,10 @@ updates:
package-ecosystem: docker
schedule:
interval: monthly
day: saturday
groups:
docker-dependencies:
patterns:
- "*"
commit-message:
prefix: build(docker)
labels:
Expand Down
31 changes: 20 additions & 11 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# >>> PULL REQUEST LABELS
# -------------------------------------------- LABELS ------------------------------------------- #
autolabeler:
# Conventional Commit Types (https://github.com/commitizen/conventional-commit-types)
- label: build
Expand Down Expand Up @@ -38,20 +38,19 @@ autolabeler:
- label: breaking
title:
- '/^[a-z]+(\(.*\))?\!\:/'
# >>> AUTOMATIC VERSIONING (PRE 1.0)
# ------------------------------------------ VERSIONING ----------------------------------------- #
version-resolver:
minor:
labels:
- breaking
default: patch
# >>> RELEASE CONFIGURATION
# --------------------------------------- RELEASE TEMPLATE -------------------------------------- #
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
category-template: "### $TITLE"
change-template: "- $TITLE by @$AUTHOR in [#$NUMBER]($URL)"
replacers:
# remove conventional commit tag & scope from change list
- search: '/- [a-z]+(\(.*\))?(\!)?\: /g'
- search: '/- [a-z]+(\!)?\: /g'
replace: "- "
template: |
## What's Changed
Expand All @@ -72,19 +71,29 @@ categories:
- title: 🏎️ Performance Improvements
labels:
- performance
- title: 📚 Documentation
labels:
- documentation
- title: 🏗️ Testing
labels:
- test
- title: ⚙️ Automation
labels:
- ci
- title: 📝 Documentation
labels:
- documentation
- title: 🪵 Miscellaneous
- title: 🛠 Builds
labels:
- build
- chore
- title: 💎 Code Style
labels:
- style
- title: 📦 Refactorings
labels:
- refactor
- title: ♻️ Chores
labels:
- chore
- title: 🗑 Reverts
labels:
- revert
- style
exclude-labels:
- dependencies
39 changes: 25 additions & 14 deletions .github/workflows/pull_request.yml → .github/workflows/chore.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
name: Pull Request
name: Chore
on:
pull_request:
branches: [main]
types: [opened, reopened, edited, synchronize]
push:
branches: [main]

permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write

jobs:
check-title:
name: Check Title
check-pr-title:
name: Check PR Title
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check valid conventional commit message
id: lint
uses: amannn/action-semantic-pull-request@v5
with:
subjectPattern: ^(?![A-Z]).+$ # subject should not start with uppercase letter
subjectPattern: ^[A-Z].+[^. ]$ # subject must start with uppercase letter and may not end with a dot/space
scopes: |
docker
go
helm
env:
Expand All @@ -36,26 +42,31 @@ jobs:
This repository requires pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
<details><summary>**Details**</summary>
<details><summary><b>Details</b></summary>
```
${{ steps.lint.outputs.error_message }}
```
</details>
- name: Delete comment about invalid PR title
if: success()
uses: marocchino/sticky-pull-request-comment@v2
with:
header: conventional-commit-pr-title
delete: true

assign-labels:
name: Assign Labels
release-drafter:
name: ${{ github.event_name == 'pull_request' && 'Assign Labels' || 'Draft Release' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Assign labels based on conventional commits
uses: release-drafter/release-drafter@v5
- name: ${{ github.event_name == 'pull_request' && 'Assign labels' || 'Update release draft' }}
uses: release-drafter/release-drafter@v6
with:
disable-releaser: true
disable-releaser: ${{ github.event_name == 'pull_request' }}
disable-autolabeler: ${{ github.event_name == 'push' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
22 changes: 0 additions & 22 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit de436c3

Please sign in to comment.