From 89768f866b2aa39a66e450156e5d15e0427ae944 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 11 Oct 2023 11:56:06 +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/appimage.yml | 2 +- .github/workflows/coverage.yml | 1 + .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 526c879b..c857fead 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -34,7 +34,7 @@ jobs: name: deploy AppImage runs-on: ubuntu-latest needs: build-appimage - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'linux-nvme/nvme-cli' }} steps: - name: Download artifact uses: dawidd6/action-download-artifact@v2 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 39ea739a..d272d0f9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,6 +7,7 @@ on: jobs: code-coverage: + if: github.repository == 'linux-nvme/nvme-cli' name: code coverage runs-on: ubuntu-latest container: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82594806..8a5651c8 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/nvme-cli' permissions: contents: write steps: -- 2.50.1