diff options
author | Pierre Ossman <ossman@cendio.se> | 2021-11-09 16:21:41 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2021-11-09 16:32:34 +0100 |
commit | c2980d15e938c3759da9e6d1ca1775c27d97fc62 (patch) | |
tree | 6c38cfc67e81ecd9c7ee407228f5c172f7baf60d | |
parent | bbbcab692acd2e4761154866053fb6b24e7d48b9 (diff) | |
download | novnc-c2980d15e938c3759da9e6d1ca1775c27d97fc62.tar.gz |
Only publish if we are in the original repo
This avoids people having failing actions in forks of our repo since
they don't have permission to publish things.
-rw-r--r-- | .github/workflows/deploy.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a8f760..a1ddfd9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,18 +31,21 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} if: | + github.repository == 'novnc/noVNC' && github.event_name == 'release' && !github.event.release.prerelease - run: npm publish --access public --tag beta env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} if: | + github.repository == 'novnc/noVNC' && github.event_name == 'release' && github.event.release.prerelease - run: npm publish --access public --tag dev env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} if: | + github.repository == 'novnc/noVNC' && github.event_name == 'push' && github.event.ref == 'refs/heads/master' snap: @@ -72,6 +75,7 @@ jobs: snap: ${{ steps.snapcraft.outputs.snap }} release: stable if: | + github.repository == 'novnc/noVNC' && github.event_name == 'release' && !github.event.release.prerelease - uses: snapcore/action-publish@v1 @@ -80,6 +84,7 @@ jobs: snap: ${{ steps.snapcraft.outputs.snap }} release: beta if: | + github.repository == 'novnc/noVNC' && github.event_name == 'release' && github.event.release.prerelease - uses: snapcore/action-publish@v1 @@ -88,5 +93,6 @@ jobs: snap: ${{ steps.snapcraft.outputs.snap }} release: edge if: | + github.repository == 'novnc/noVNC' && github.event_name == 'push' && github.event.ref == 'refs/heads/master' |