From ba01a984c011731dd02d47eb4bb50dc2b9b61c0f Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Wed, 8 Oct 2025 12:08:25 +0000 Subject: [PATCH] Prevent upload to swift if its from a fork --- otc_metadata/templates/build-html-docs.yaml.j2 | 6 ++++++ otc_metadata/templates/build-pdf-docs.yaml.j2 | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/otc_metadata/templates/build-html-docs.yaml.j2 b/otc_metadata/templates/build-html-docs.yaml.j2 index abbbef7..be719d6 100644 --- a/otc_metadata/templates/build-html-docs.yaml.j2 +++ b/otc_metadata/templates/build-html-docs.yaml.j2 @@ -12,6 +12,9 @@ jobs: tox-env: docs - name: Upload documentation preview + {% raw -%} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + {%- endraw %} uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1 {%- elif environment == 'public' %} - uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1 @@ -19,6 +22,9 @@ jobs: tox-env: docs - name: Upload documentation preview + {% raw -%} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + {%- endraw %} uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1 {%- endif %} with: diff --git a/otc_metadata/templates/build-pdf-docs.yaml.j2 b/otc_metadata/templates/build-pdf-docs.yaml.j2 index ee0e418..afbcba7 100644 --- a/otc_metadata/templates/build-pdf-docs.yaml.j2 +++ b/otc_metadata/templates/build-pdf-docs.yaml.j2 @@ -12,6 +12,9 @@ jobs: tox-env: pdf-docs - name: Upload documentation preview + {% raw -%} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + {%- endraw %} uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1 {%- elif environment == 'public' %} - uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1 @@ -19,6 +22,9 @@ jobs: tox-env: pdf-docs - name: Upload documentation preview + {% raw -%} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + {%- endraw %} uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1 {%- endif %} with: -- 2.34.1