mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2024-11-22 10:26: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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- labeled
|
- reopened
|
||||||
- unlabeled
|
|
||||||
- synchronize
|
|
||||||
- unlocked
|
- unlocked
|
||||||
|
- unlabeled
|
||||||
|
pull_request_review:
|
||||||
|
types:
|
||||||
|
- submitted
|
||||||
check_suite:
|
check_suite:
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
@ -18,29 +20,19 @@ jobs:
|
||||||
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
|
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
|
||||||
steps:
|
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
|
uses: actions/github-script@0.9.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
script: |
|
script: |
|
||||||
await github.pulls.createReview({
|
github.repos.createDispatchEvent({
|
||||||
owner: context.payload.repository.owner.login,
|
...context.repo,
|
||||||
repo: context.payload.repository.name,
|
event_type: 'ncc'
|
||||||
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'
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
name: master
|
name: ncc
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
repository_dispatch:
|
||||||
|
types:
|
||||||
|
- 'ncc'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
|
@ -8,7 +11,7 @@ on:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prune:
|
ncc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
|
@ -28,7 +31,8 @@ jobs:
|
||||||
git config user.name GitHub
|
git config user.name GitHub
|
||||||
git config user.email noreply@github.com
|
git config user.email noreply@github.com
|
||||||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
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: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
Loading…
Reference in New Issue
Block a user