dependabot

This commit is contained in:
appkins
2024-07-13 05:28:46 -05:00
parent e99c608dec
commit db15da70a5
2 changed files with 41 additions and 7 deletions

View File

@@ -1,11 +1,13 @@
---
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'daily'
- package-ecosystem: 'gomod'
directory: '/'
interval: "daily"
time: "02:03"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: 'daily'
interval: "daily"
time: "02:03"

32
.github/workflows/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
# Autogenerated by https://github.com/appkins/ecu/github
name: Dependabot auto-approve
on:
pull_request_target:
types: [opened]
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.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}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}