ci(package-pr): use github scripts

This commit is contained in:
Thomas Hobson 2021-02-28 16:21:38 +13:00
parent f0f5991bf3
commit ab14de9ae8
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 7 additions and 8 deletions

View File

@ -39,12 +39,11 @@ jobs:
PACKAGES=${PACKAGES//$'\r'/'%0D'} PACKAGES=${PACKAGES//$'\r'/'%0D'}
echo "::set-output name=packages::$PACKAGES" echo "::set-output name=packages::$PACKAGES"
- name: 'Comment PR'
- name: Comment on PR uses: actions/github-script@0.3.0
uses: unsplash/comment-on-pr@master if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
msg: "Affected packages:\n${{ steps.get-packages.outputs.packages }}" github-token: ${{ secrets.GITHUB_TOKEN }}
check_for_duplicate_msg: true script: |
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
github.issues.createComment({ issue_number, owner, repo, body: "Affected packages:\n${{ steps.get-packages.outputs.packages }}" });