From e89e785137c83b421bf81670726ad2e66ea78daa Mon Sep 17 00:00:00 2001 From: Tino Hager Date: Fri, 13 Dec 2024 21:40:42 +0100 Subject: [PATCH] update workflows --- .../dependabot-github-actions-automerge.yml | 26 +++++++++++++++++++ .github/workflows/dotnet.yml | 4 +-- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/dependabot-github-actions-automerge.yml diff --git a/.github/workflows/dependabot-github-actions-automerge.yml b/.github/workflows/dependabot-github-actions-automerge.yml new file mode 100644 index 0000000..c9ce03f --- /dev/null +++ b/.github/workflows/dependabot-github-actions-automerge.yml @@ -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}} diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index bc68392..e40a402 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -9,12 +9,10 @@ on: pull_request: paths: - 'src/**' - - '.github/workflows/**' branches: [ main ] permissions: pull-requests: write - contents: write jobs: build: @@ -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}}