Slide 18
Slide 18 text
コメントをつける actions を利用
env:
DEPLOYMENT_RECORD_ISSUE_NUMBER: 1234
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set ref link for notification
id: set_link
run: |
if [[ "${GITHUB_REF_TYPE}" == "branch" ]]; then
echo "::set-output name=REF_LINK::[${GITHUB_SHA:0:8}](https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA})"
elif [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
echo "::set-output
name=REF_LINK::[${GITHUB_REF_NAME}](https://github.com/${GITHUB_REPOSITORY}/releases/tag/${GITHUB_REF_NAME})"
fi
- name: Create comment
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ env.DEPLOYMENT_RECORD_ISSUE_NUMBER }}
body: |
@${{ github.actor }}
${{ steps.set_link.outputs.REF_LINK }} によるdevデプロイを開始します。
コミットへのリンク作成
イシューにコメントする