-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimize auto merge for github actions
- Loading branch information
Showing
2 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
contents: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,19 +33,3 @@ jobs: | |
working-directory: ./src | ||
run: | | ||
dotnet test --configuration Release --no-restore --no-build --verbosity normal | ||
dependabot: | ||
name: Dependabot Auto Merge | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }} | ||
|
||
steps: | ||
- name: Dependabot Auto Merge | ||
uses: dailydevops/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
command: squash | ||
handle-submodule: true | ||
target: minor |