Skip to content

Commit

Permalink
fix(github-actions): use the actions/github-script action instead o…
Browse files Browse the repository at this point in the history
…f the deprecated `actions/github` action (#934)
  • Loading branch information
miyajan committed Nov 3, 2020
1 parent f317502 commit 4f56bdb
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions packages/shipjs/src/step/setup/CI/addGitHubActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
);
Expand Down

0 comments on commit 4f56bdb

Please sign in to comment.