Skip to content

Commit c509218

Browse files
committed
ci: Only try to push to s3 for same-repo pull requests
When running CI on pull requests, the S3 keys needed to push doc changes are only accessible when the pull request comes from the same repo as the project repo. If it is from a clone, these are not available, and the push fails. Work around this by correctly detecting this case, and avoiding the s3 push in these instances. As we get more and more outside contributions, this will need to be revisited, possibly with a separate workflow that runs in a different context and has the keys available. Signed-off-by: David Brown <[email protected]>
1 parent dd73abc commit c509218

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ jobs:
8181
runs-on: ubuntu-24.04
8282
if: |
8383
github.event_name == 'pull_request' &&
84-
github.repository == 'zephyrproject-rtos/zephyr-lang-rust'
84+
github.repository == 'zephyrproject-rtos/zephyr-lang-rust' &&
85+
github.event.pull_request.repo.full_name == github.repository
8586
8687
steps:
8788
- name: Download documentation artifact

0 commit comments

Comments
 (0)