Skip to content

Commit af99788

Browse files
committed
ci: fix docpublish workflow
It seems that it's possible to inject envs with current code. Fixing this issue. Signed-off-by: Kari Hamalainen <[email protected]>
1 parent 4afc3bb commit af99788

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/docpublish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ jobs:
3131
- name: Obtain PR number
3232
working-directory: docs
3333
run: |
34-
echo "PR=$(cat pr.txt)" >> "$GITHUB_ENV"
34+
if [ -f pr.txt ]; then
35+
PR=$(head -n 1 pr.txt | tr -cd '0-9')
36+
fi
37+
printf 'PR=%s\n' "$PR" >> "$GITHUB_ENV"
3538
3639
- name: Upload to Azure storage
3740
working-directory: docs

0 commit comments

Comments
 (0)