diff --git a/packages/shipjs/src/step/setup/CI/addGitHubActions.js b/packages/shipjs/src/step/setup/CI/addGitHubActions.js index 7fb75f58..dfa37db2 100644 --- a/packages/shipjs/src/step/setup/CI/addGitHubActions.js +++ b/packages/shipjs/src/step/setup/CI/addGitHubActions.js @@ -151,22 +151,32 @@ jobs: needs: manual_prepare runs-on: ubuntu-latest steps: - - uses: actions/github@master - env: - GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} + - uses: actions/github-script@v3 with: - args: comment "@\${{ github.actor }} \`shipjs prepare\` done" + github-token: \${{ secrets.GITHUB_TOKEN }} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "@\${{github.actor}} \`shipjs prepare\` done" + }) create_fail_comment: if: cancelled() || failure() needs: manual_prepare runs-on: ubuntu-latest steps: - - uses: actions/github@master - env: - GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} + - uses: actions/github-script@v3 with: - args: comment "@\${{ github.actor }} \`shipjs prepare\` fail" + github-token: \${{ secrets.GITHUB_TOKEN }} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "@\${{github.actor}} \`shipjs prepare\` fail" + }) `, { baseBranch } );