mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2024-11-21 18:06:08 -07:00
Update workflows
This commit is contained in:
parent
9a4ad86134
commit
ca56e9169c
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: master
|
||||
name: ncc
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- 'ncc'
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
@ -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