Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Dec 13, 2024
1 parent 5e6bf4c commit e89e785
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/dependabot-github-actions-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dependabot GitHub Actions Auto Merge

on:
pull_request:
paths:
- '.github/workflows/**'
branches: [ main ]

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
needs: build
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
- name: Enable auto-merge for Dependabot PRs
if: ${{steps.dependabot-metadata.outputs.package-ecosystem == 'github_actions'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
4 changes: 1 addition & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ on:
pull_request:
paths:
- 'src/**'
- '.github/workflows/**'
branches: [ main ]

permissions:
pull-requests: write
contents: write

jobs:
build:
Expand Down Expand Up @@ -69,7 +67,7 @@ jobs:
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
- name: Enable auto-merge for Dependabot PRs
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.package-ecosystem == 'github_actions'}}
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down

0 comments on commit e89e785

Please sign in to comment.