mirror of
https://github.com/gofiber/storage.git
synced 2025-12-24 13:29:30 +08:00
Update dependabot_automerge.yml
This commit is contained in:
74
.github/workflows/dependabot_automerge.yml
vendored
74
.github/workflows/dependabot_automerge.yml
vendored
@@ -1,45 +1,39 @@
|
||||
name: Dependabot auto-merge
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- "Tests S3"
|
||||
- "Tests Ristretto"
|
||||
- "Tests Redis"
|
||||
- "Tests Postgres"
|
||||
- "Tests MySQL"
|
||||
- "Tests Mongodb"
|
||||
- "Tests Memcache"
|
||||
- "Tests DynamoDB"
|
||||
- "Tests Bbolt"
|
||||
- "Tests ArangoDB"
|
||||
- "Tests Local Storage"
|
||||
- Security
|
||||
- Linter
|
||||
- "CodeQL"
|
||||
types:
|
||||
- completed
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
dependabot:
|
||||
name: Dependabot auto-merge
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- uses: ahmadnassri/action-workflow-run-wait@v1
|
||||
- name: Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@v1.3.3
|
||||
with:
|
||||
github-token: "${{ secrets.PR_TOKEN }}"
|
||||
- name: Enable auto-merge for Dependabot PRs
|
||||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
||||
run: |
|
||||
gh pr review --approve "$PR_URL"
|
||||
gh pr merge --auto --merge "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GITHUB_TOKEN: ${{secrets.PR_TOKEN}}
|
||||
wait_for_checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Wait for check is finished
|
||||
uses: lewagon/wait-on-check-action@v1.0.0
|
||||
id: wait_for_checks
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
running-workflow-name: wait_for_checks
|
||||
check-regexp: Tests
|
||||
repo-token: ${{ secrets.PR_TOKEN }}
|
||||
wait-interval: 10
|
||||
dependabot:
|
||||
needs: [wait_for_checks]
|
||||
name: Dependabot auto-merge
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- name: Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@v1.3.3
|
||||
with:
|
||||
github-token: "${{ secrets.PR_TOKEN }}"
|
||||
- name: Enable auto-merge for Dependabot PRs
|
||||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
||||
run: |
|
||||
gh pr review --approve "$PR_URL"
|
||||
gh pr merge --auto --merge "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GITHUB_TOKEN: ${{secrets.PR_TOKEN}}
|
||||
|
||||
Reference in New Issue
Block a user