mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
fix: workflow
This commit is contained in:
parent
97c1985479
commit
23fea2dae9
13
.github/workflows/pull.yml
vendored
13
.github/workflows/pull.yml
vendored
@ -9,20 +9,9 @@ jobs:
|
|||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# Runs a single command using the runners shell
|
|
||||||
- name: Get PR commit message
|
|
||||||
id: pr
|
|
||||||
run: |
|
|
||||||
commitmessage=$(git log --format=%B -n 1)
|
|
||||||
echo "message=$commitmessage" > $GITHUB_OUTPUT
|
|
||||||
echo "set message=$commitmessage"
|
|
||||||
|
|
||||||
# Runs a set of commands using the runners shell
|
# Runs a set of commands using the runners shell
|
||||||
- name: Close PR if commit message is "Update main.go"
|
- name: Close PR if commit message is "Update main.go"
|
||||||
if: steps.pr.outputs.message == 'Update main.go'
|
if: github.event.pull_request.title == 'Update main.go'
|
||||||
run: |
|
run: |
|
||||||
echo "Closing this PR because commit message is 'Update main.go'"
|
echo "Closing this PR because commit message is 'Update main.go'"
|
||||||
gh pr close ${{ github.event.pull_request.number }} --delete-branch
|
gh pr close ${{ github.event.pull_request.number }} --delete-branch
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user