Skip to content

Commit e1389fa

Browse files
committed
ci: doc-publish-pr: Improve workflow security
Improve workflow security. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 14478ca commit e1389fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/doc-publish-pr.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ jobs:
3030

3131
- name: Load PR number
3232
if: steps.download-artifacts.outputs.found_artifact == 'true'
33-
run: |
34-
echo "PR_NUM=$(<pr_num/pr_num)" >> $GITHUB_ENV
33+
uses: actions/github-script@v7
34+
with:
35+
script: |
36+
let fs = require("fs");
37+
let pr_number = Number(fs.readFileSync("./pr_num/pr_num"));
38+
core.exportVariable("PR_NUM", pr_number);
3539
3640
- name: Check PR number
3741
if: steps.download-artifacts.outputs.found_artifact == 'true'

0 commit comments

Comments
 (0)