File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818jobs :
1919 upload :
2020 runs-on : ubuntu-latest
21+ # Only run on manual dispatch,
22+ # OR if the parent run succeeded and was triggered by a PR from
23+ # a branch in the main repo (not a fork)
2124 if : |
2225 github.event_name == 'workflow_dispatch' ||
2326 (
2427 github.event_name == 'workflow_run' &&
2528 github.event.workflow_run.event == 'pull_request' &&
26- github.event.workflow_run.conclusion == 'success'
29+ github.event.workflow_run.conclusion == 'success' &&
30+ github.event.workflow_run.head_repository.full_name == github.repository
2731 )
2832 steps :
2933 - name : Get required metadata (PR number, commit SHA, workflow run ID containing artifacts)
4953 exit 1
5054 fi
5155
52- # If PR_NUM is empty (this is the case for forks) get PR number using SHA
56+ # If PR_NUM is empty, get PR number using SHA
5357 if [ -z "${PR_NUM}" ]; then
5458 PR_NUM=$(gh pr list --search "sha:${SHA}" --state open --json number --jq '.[0].number')
5559 fi
@@ -139,6 +143,7 @@ jobs:
139143 run : |
140144 # Move 'pr-NNNN/' directory into upload directory inside repo and cd into repo root
141145 TARGET_DIR="${UPLOAD_DIR_NAME}/pr-${PR_NUM}"
146+ mkdir -p plotly.js-dev-builds/${UPLOAD_DIR_NAME}
142147 cp -r ${TARGET_DIR} plotly.js-dev-builds/
143148 cd plotly.js-dev-builds
144149
You can’t perform that action at this time.
0 commit comments