diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2022-07-06 16:16:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-06 09:16:33 -0400 |
commit | 794ef438dacc5098932afb07424725d37d3ac26e (patch) | |
tree | 280d24aa509bc33f84c128b92d881a6e9ad0473b /.github/workflows/packaging.yml | |
parent | 49234f23de3a32682daff07ca229b6b62f24c090 (diff) |
Explicitly skip uploads and notifications in third-party repositories. (#13308)
* Explicitly skip uploads and notifications in third-party repositories.
This changes how we handle uploads and Slack notifications in our
release build workflows so that they are skipped when running in
repositories other than our own.
This simplifies testing and verification of the core release code by
enabling testers to run a mock release build or mock nightly build to
completion without worrying about the uploads and slack notifications
failing the whole workflow.
* Fix conditional.
Diffstat (limited to '.github/workflows/packaging.yml')
-rw-r--r-- | .github/workflows/packaging.yml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index ce65c6f7de..ec4e42c002 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -94,6 +94,7 @@ jobs: failure() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/heads/master') + && github.repository == 'netdata/netdata' }} version-check: @@ -149,6 +150,7 @@ jobs: failure() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/heads/master') + && github.repository == 'netdata/netdata' }} build: @@ -216,7 +218,7 @@ jobs: /netdata/.github/scripts/pkg-test.sh - name: SSH setup id: ssh-setup - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' continue-on-error: true uses: shimataro/ssh-key-action@v2 with: @@ -226,7 +228,7 @@ jobs: - name: Upload to packages.netdata.cloud id: package-upload continue-on-error: true - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' run: | .github/scripts/package-upload.sh \ ${{ matrix.repo_distro }} \ @@ -235,7 +237,7 @@ jobs: ${{ needs.version-check.outputs.repo }} - name: Upload to PackageCloud id: upload - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' shell: bash env: PKG_CLOUD_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_KEY }} @@ -270,4 +272,5 @@ jobs: failure() && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/heads/master') + && github.repository == 'netdata/netdata' }} |