]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
build: upload artifacts only for upstream repo
authorDaniel Wagner <dwagner@suse.de>
Wed, 11 Oct 2023 10:08:54 +0000 (12:08 +0200)
committerDaniel Wagner <wagi@monom.org>
Wed, 11 Oct 2023 10:10:36 +0000 (12:10 +0200)
Only upload any artifacts to linux-nvme organization if it's NOT a fork.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
.github/workflows/coverage.yml
.github/workflows/release-python.yml
.github/workflows/release.yml

index 39ea739aaf442792f1bc1312ba618563c04601a0..3ed1f995992fac164d7469100fb4d8b0d9c435c3 100644 (file)
@@ -7,6 +7,7 @@ on:
 
 jobs:
   code-coverage:
+    if: github.repository == 'linux-nvme/libnvme'
     name: code coverage
     runs-on: ubuntu-latest
     container:
index d30aacc58e764d899fa4740bd72800c25b85a6ba..01a31ff986e9e2f9b5f662044fe9511a799d2f98 100644 (file)
@@ -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
index 63bb5e117e88652c429c7b79af8563e09acdda0b..d4ef038593ad9080227a62afc328286a3955a8ef 100644 (file)
@@ -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: