fix: workflow

This commit is contained in:
源文雨 2023-09-20 20:24:14 +09:00
parent de986d8be8
commit 1a8ebe02fb

View File

@ -9,12 +9,20 @@ 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:
- name: Autoclose PR that matched exclude-regex # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: aws-actions/pr-regex-exclude@main - uses: actions/checkout@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }} # Runs a single command using the runners shell
message: "This PR was automatically closed because it is invalid." - name: Get PR commit message
exclude-regex: '.*Update main\.go.*' id: pr
run: echo "::set-output name=message::$(git log --format=%B -n 1)"
# Runs a set of commands using the runners shell
- name: Close PR if commit message is "Update main.go"
if: steps.pr.outputs.message == 'Update main.go'
run: |
echo "Closing this PR because commit message is 'Update main.go'"
gh pr close ${{ github.event.pull_request.number }} --delete-branch
golangci: golangci:
name: lint name: lint