mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
Add enable auto merge
This commit is contained in:
parent
715ba50907
commit
b4bce3eaa7
3 changed files with 52 additions and 2 deletions
25
.github/actions/github-app-token/action.yml
vendored
Normal file
25
.github/actions/github-app-token/action.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: github-app-token
|
||||||
|
description: github-app-token
|
||||||
|
inputs:
|
||||||
|
app_id:
|
||||||
|
description: app_id
|
||||||
|
required: true
|
||||||
|
private_key:
|
||||||
|
description: private_key
|
||||||
|
required: true
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
token:
|
||||||
|
description: token
|
||||||
|
value: ${{ steps.token.outputs.token }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- uses: tibdex/github-app-token@v1.6.0
|
||||||
|
with:
|
||||||
|
app_id: ${{ inputs.app_id }}
|
||||||
|
private_key: ${{ inputs.private_key }}
|
||||||
|
env:
|
||||||
|
OPENSSL_CONF: /dev/null
|
||||||
|
id: token
|
26
.github/workflows/enable-automerge.yml
vendored
Normal file
26
.github/workflows/enable-automerge.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: Enable auto merge
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- develop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
enable-auto-merge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# if: github.event.pull_request.user.login == 'renovate[bot]' && contains(github.event.pull_request.labels.*.name, 'dependencies')
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Generate github token
|
||||||
|
id: generate_token
|
||||||
|
uses: ./.github/actions/github-app-token
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.APP_ID }}
|
||||||
|
private_key: ${{ secrets.PRIVATE_KEY }}
|
||||||
|
- uses: alexwilson/enable-github-automerge-action@main
|
||||||
|
with:
|
||||||
|
github-token: ${{ steps.generate_token.outputs.token }}
|
|
@ -12,6 +12,5 @@
|
||||||
"matchUpdateTypes": ["major"],
|
"matchUpdateTypes": ["major"],
|
||||||
"addLabels": ["major update"]
|
"addLabels": ["major update"]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"assignees": ["na2na-p"]
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue