From acfa4c49ccb11651f33dec1484c60ddc1fad3865 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 11 Oct 2023 12:08:54 +0200 Subject: [PATCH] build: upload artifacts only for upstream repo Only upload any artifacts to linux-nvme organization if it's NOT a fork. Signed-off-by: Daniel Wagner --- .github/workflows/coverage.yml | 1 + .github/workflows/release-python.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 39ea739a..3ed1f995 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,6 +7,7 @@ on: jobs: code-coverage: + if: github.repository == 'linux-nvme/libnvme' name: code coverage runs-on: ubuntu-latest container: diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index d30aacc5..01a31ff9 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -51,7 +51,7 @@ jobs: upload_pypi: needs: [build_sdist] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'linux-nvme/libnvme' steps: - name: Check if it is a release tag id: check-tag diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63bb5e11..d4ef0385 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ on: jobs: build: runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'linux-nvme/libnvme' permissions: contents: write steps: