例
name: Comment to PR
on:
pull_request:
types: [opened]
jobs:
comment:
name: "comment to PR"
runs-on: ubuntu-latest
steps:
- name: Make comment body
id: make-terraform-comment
run: |
comment_body_file="/tmp/pr_comment_body.txt" # 出力先ファイル
echo "test" >> ${comment_body_file}
# 次のステップで使うためにset-output
echo ::set-output name=header::changeset-comment # 後述
echo ::set-output name=result::${comment_body_file} # 出力先ファイル
- name: Comment on pull request
uses: marocchino/sticky-pull-request-comment@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: "header"
path: ${{ steps.make-terraform-comment.outputs.result }}
