From c5092187054d43fd856996b00cf363615028469d Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 27 Jun 2025 11:23:56 -0600 Subject: [PATCH] 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 --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0e65bd73..d5e6fa19 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -81,7 +81,8 @@ jobs: runs-on: ubuntu-24.04 if: | github.event_name == 'pull_request' && - github.repository == 'zephyrproject-rtos/zephyr-lang-rust' + github.repository == 'zephyrproject-rtos/zephyr-lang-rust' && + github.event.pull_request.repo.full_name == github.repository steps: - name: Download documentation artifact