Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the actions/github-script action instead of the deprecated actions/github action #934

Merged
merged 1 commit into from
Nov 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: use the actions/github-script action instead of the deprecated…
… `actions/github` action
  • Loading branch information
miyajan committed Nov 3, 2020
commit 9adcac67107aec4a238d9246953075b2e6492769
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