This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/main by this push:
new f20eb54 fix(github): preview workflow, add issue number
f20eb54 is described below
commit f20eb543d7a7431bbeb0217f107932ab99d82af7
Author: Zoran Regvart <[email protected]>
AuthorDate: Wed Apr 28 12:25:35 2021 +0200
fix(github): preview workflow, add issue number
We're missing the pull request number for the preview comment.
---
.github/workflows/preview.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml
index 325166a..4e62340 100644
--- a/.github/workflows/preview.yaml
+++ b/.github/workflows/preview.yaml
@@ -59,12 +59,13 @@ jobs:
run: |
DEPLOY_URL=$(yarn preview:netlify --alias="pr-$(cat
pull_request/number)" --message="Preview for $(cat pull_request/html_url)"
--json 2> /dev/null |jq -r .deploy_url)
echo "DEPLOY_URL=${DEPLOY_URL}" >> $GITHUB_ENV
+ echo "ISSUE_NUMBER=$(cat pull_request/number)" >> $GITHUB_ENV
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.createComment({
- issue_number: context.issue.number,
+ issue_number: Number(process.env.ISSUE_NUMBER),
owner: context.repo.owner,
repo: context.repo.repo,
body: `🚀 Preview is available at ${process.env.DEPLOY_URL}`