Skip to content

feat: output pr_comments to github action #406

feat: output pr_comments to github action

feat: output pr_comments to github action #406

Workflow file for this run

name: Commit Check
on:
pull_request:
branches: 'main'
workflow_dispatch:
jobs:
commit-check:
runs-on: ubuntu-latest
permissions: # use permissions because of use pr-comments
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
fetch-depth: 0 # fetch all history for all branches and tags
- uses: ./ # self test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
with:
message: true
branch: true
author-name: true
author-email: true
commit-signoff: true
merge-base: true
imperative: true
job-summary: true
pr-comments: ${{ github.event_name == 'pull_request' }}
- name: Save GITHUB_OUTPUT to pr-comments.txt
run: echo "$GITHUB_OUTPUT" > pr-comments.txt
- name: Upload pr-comments.txt
uses: actions/upload-artifact@v4
with:
name: commit-check-pr-comments
path: pr-comments.txt