Skip to content

Commit

Permalink
PI-2410 Auto-merge minor+patch Dependabot PRs
Browse files Browse the repository at this point in the history
Also reduced frequency, all Dependabot updates will now happen on Monday.
  • Loading branch information
marcus-bcl committed Aug 1, 2024
1 parent 9540e9e commit e67989f
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 21 deletions.
39 changes: 18 additions & 21 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "software.amazon.awssdk:*" # reduce the noise of frequent AWS SDK updates
update-types: ["version-update:semver-patch"]
interval: "weekly"
groups:
minor:
update-types:
Expand All @@ -21,7 +18,7 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
groups:
minor:
update-types:
Expand All @@ -33,79 +30,79 @@ updates:
- package-ecosystem: "github-actions"
directory: "/.github/actions/analyse"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/app-insights-to-slack"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/check-changes"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/cloud-platform-auth"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/cloud-platform-deploy"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/create-signed-pull-request"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/docker-build"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/format-code"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/get-build-info"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/get-env-details"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/merge-changes"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/.github/actions/render-project-template"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "terraform"
directory: "/templates"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "docker"
directory: "/projects/person-search-index-from-delius/container"
schedule:
interval: "daily"
interval: "weekly"

- package-ecosystem: "docker"
directory: "/projects/redrive-dead-letter-queues/container"
schedule:
interval: "monthly" # to reduce frequency of AWS CLI updates
interval: "weekly"

- package-ecosystem: "docker"
directory: "/projects/feature-flags/container"
schedule:
interval: "daily"
interval: "weekly"
10 changes: 10 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ jobs:
name: Build
uses: ./.github/workflows/build.yml

post-build:
name: Post-build
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Merge changes from the matrix build
id: merge-changes
uses: ./.github/actions/merge-changes

analyse:
name: Analyse
runs-on: ubuntu-latest
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Automated management of Dependabot PRs
name: Dependabot
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ github.token }}"

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ github.token }}

- name: Auto-approve minor or patch versions
run: gh pr review --approve "$PR_URL"
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ github.token }}

0 comments on commit e67989f

Please sign in to comment.