Skip to content

Commit

Permalink
chore(ci): do not raise failure on comment post error
Browse files Browse the repository at this point in the history
  • Loading branch information
kyujin-cho committed May 16, 2024
1 parent ee7fe71 commit 943ccdc
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const commentResult = await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `APK build completed! Visit [action run detail page](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) to download the APK to test this pull request.`
})
console.log(commentResult)
try {
const commentResult = await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `APK build completed! Visit [action run detail page](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) to download the APK to test this pull request.`
})
console.log(commentResult)
} catch (e) {
console.log("Comment not posted:")
console.log(e)
}
build-release-apk:
needs: [lint]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
Expand Down

0 comments on commit 943ccdc

Please sign in to comment.