Skip to content

Commit

Permalink
Use dependabot groups and auto-release
Browse files Browse the repository at this point in the history
  • Loading branch information
ogesaku committed Oct 27, 2024
1 parent 56fe433 commit a398ce8
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# https://github.com/orgs/community/discussions/23064
.github/workflows/*
gradle/**
**/build.gradke.kts
**/build.gradle.kts
**/settings.gradle.kts
39 changes: 35 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,42 @@
version: 2
updates:
- package-ecosystem: "gradle"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
groups:
# merged and released instantly
sec-updates:
applies-to: security-updates
patterns:
- "*"
# merged automatically
dev-dependencies:
patterns:
- "*"

- package-ecosystem: "github-actions"
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
groups:
# merged and released instantly
sec-updates:
applies-to: security-updates
patterns:
- "*"
# merged automatically
dev-dependencies:
patterns:
- "io.kotest*"
- "*-test"
- "*assert"
# merged and released automatically
prod-dependencies:
update-types:
- "patch"
- "minor"
# requires human approval and has higher chance to fail build
prod-dependencies-major:
update-types:
- "major"
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
with:
java-version: 21
build-command: ./gradlew build coverage
snapshot-command: ./gradlew publishToSonatype -Pversion=$NEXT_VERSION
33 changes: 32 additions & 1 deletion .github/workflows/release-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@ name: Release Auto

on:
workflow_dispatch:
inputs:
security-updates-only:
description: "Security updates only"
type: boolean
required: false
default: false
consider-snapshot:
description: "Consider snapshot"
type: boolean
required: false
default: false
workflow_run:
workflows: [ "Build" ]
types: [ completed ]
branches:
- main
- v*x.x
schedule:
# at 5:30 UTC every other month
- cron: "30 5 1 */2 *"
Expand All @@ -10,9 +27,23 @@ jobs:
check:
uses: coditory/workflows/.github/workflows/release-auto-check.yml@v1
secrets: inherit
with:
security-updates-only: ${{ inputs.security-updates-only || github.event_name == 'workflow_run' }}
debug: true

auto-release:
release:
uses: ./.github/workflows/release.yml
secrets: inherit
needs: check
if: needs.check.outputs.release == 'true'

snapshot:
uses: ./.github/workflows/release.yml
needs: check
secrets: inherit
if: |
(inputs.consider-snapshot || github.event_name == 'workflow_run')
&& needs.check.outputs.release != 'true'
&& needs.check.outputs.skip-code != 'no-changes'
with:
snapshot: true

0 comments on commit a398ce8

Please sign in to comment.