株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

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 }}

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)