Update workflows
This commit is contained in:
parent
5fd486fd62
commit
9ebb8213d5
40
.github/workflows/automerge.yml
vendored
40
.github/workflows/automerge.yml
vendored
|
@ -3,10 +3,12 @@ name: automerge
|
|||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- labeled
|
||||
- unlabeled
|
||||
- synchronize
|
||||
- reopened
|
||||
- unlocked
|
||||
- unlabeled
|
||||
pull_request_review:
|
||||
types:
|
||||
- submitted
|
||||
check_suite:
|
||||
types:
|
||||
- completed
|
||||
|
@ -18,29 +20,19 @@ jobs:
|
|||
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
|
||||
steps:
|
||||
-
|
||||
name: Approve
|
||||
name: Automerge
|
||||
uses: pascalgn/automerge-action@v0.8.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
MERGE_METHOD: squash
|
||||
MERGE_COMMIT_MESSAGE: automatic
|
||||
-
|
||||
name: Dispatch event
|
||||
uses: actions/github-script@0.9.0
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
await github.pulls.createReview({
|
||||
owner: context.payload.repository.owner.login,
|
||||
repo: context.payload.repository.name,
|
||||
pull_number: context.payload.pull_request.number,
|
||||
event: 'APPROVE'
|
||||
})
|
||||
-
|
||||
name: Wait
|
||||
run: sleep 3
|
||||
-
|
||||
name: Merge
|
||||
uses: actions/github-script@0.9.0
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
await github.pulls.merge({
|
||||
owner: context.payload.repository.owner.login,
|
||||
repo: context.payload.repository.name,
|
||||
pull_number: context.payload.pull_request.number,
|
||||
merge_method: 'squash'
|
||||
github.repos.createDispatchEvent({
|
||||
...context.repo,
|
||||
event_type: 'ncc'
|
||||
})
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
name: dev
|
||||
name: ncc
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- 'ncc'
|
||||
push:
|
||||
branches:
|
||||
- 'dev'
|
||||
|
@ -8,7 +11,7 @@ on:
|
|||
- '**.md'
|
||||
|
||||
jobs:
|
||||
prune:
|
||||
ncc:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
|
@ -28,7 +31,8 @@ jobs:
|
|||
git config user.name GitHub
|
||||
git config user.email noreply@github.com
|
||||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
||||
- name: Commit and push changes
|
||||
-
|
||||
name: Commit and push changes
|
||||
run: |
|
||||
git add .
|
||||
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
Loading…
Reference in New Issue
Block a user