diff options
author | 2022-09-12 14:30:58 -0700 | |
---|---|---|
committer | 2022-09-12 14:30:58 -0700 | |
commit | 05778251dbdf13ca44d86a1fb5d2a6e3897a4186 (patch) | |
tree | 862a64cbf7d94b42324285118533274c2bf7c76a | |
parent | 8031ef8039ac698f78200400336ee0f08fd7e037 (diff) | |
download | astro-05778251dbdf13ca44d86a1fb5d2a6e3897a4186.tar.gz astro-05778251dbdf13ca44d86a1fb5d2a6e3897a4186.tar.zst astro-05778251dbdf13ca44d86a1fb5d2a6e3897a4186.zip |
Update snapshot-release.yml
-rw-r--r-- | .github/workflows/snapshot-release.yml | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index 6f2cd130f..eaf20ff59 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -29,17 +29,15 @@ jobs: - name: Extract the snapshot name from comment body id: getSnapshotName uses: actions/github-script@v6 - env: - ISSUE_NUMBER: ${{ github.event.issue.number }} with: script: | const splitComment = github.event.comment.body.split(' '); splitComment.length !== 2 && (github.rest.issues.createComment({ - issue_number: process.env.ISSUE_NUMBER, + issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: 'Invalid comment format. Expected: "!preview <one-word-snapshot-name>"', - }) || exit 1); + }) || core.setFailed('Invalid comment format. Expected: "!preview <one-word-snapshot-name>"')); return splitComment[1].trim(); result-encoding: string @@ -82,13 +80,12 @@ jobs: - name: Pull Request Notification uses: actions/github-script@v6 env: - ISSUE_NUMBER: ${{ github.event.issue.number }} MESSAGE: ${{ steps.changesets.outputs.publish }} with: script: | - console.log(process.env.ISSUE_NUMBER, process.env.MESSAGE); + console.log(process.env.MESSAGE); github.rest.issues.createComment({ - issue_number: process.env.ISSUE_NUMBER, + issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: '```\n' + process.env.MESSAGE + '\n```', |