Skip to content

Commit

Permalink
Update auto-merge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
govindkailas authored Oct 7, 2024
1 parent fc96acc commit 9c971c2
Showing 1 changed file with 39 additions and 21 deletions.
60 changes: 39 additions & 21 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
name: auto-merge

on:
pull_request:
workflow_dispatch:

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.GITHUB_TOKEN }}



# name: "Dependabot Automerge - Action"

# on:
Expand All @@ -22,26 +40,26 @@
# target: minor
# github-token: ${{ secrets.GITHUB_TOKEN }}

name: Dependabot auto-merge
on: pull_request
# name: Dependabot auto-merge
# on: pull_request

permissions:
contents: write
pull-requests: write
# permissions:
# contents: write
# pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: steps.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}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# jobs:
# dependabot:
# runs-on: ubuntu-latest
# if: github.actor == 'dependabot[bot]'
# steps:
# - name: Dependabot metadata
# id: metadata
# uses: dependabot/fetch-metadata@v2
# with:
# github-token: "${{ secrets.GITHUB_TOKEN }}"
# - name: Enable auto-merge for Dependabot PRs
# if: steps.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}}
# GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 9c971c2

Please sign in to comment.