prevent some jobs running from forked repository
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
This commit is contained in:
parent
2d6f998622
commit
f9f45b4ba4
|
@ -9,6 +9,10 @@ jobs:
|
|||
publish-chart-to-dockerhub:
|
||||
name: publish to DockerHub
|
||||
runs-on: ubuntu-22.04
|
||||
# prevent job running from forked repository, otherwise
|
||||
# 1. running on the forked repository would fail as missing necessary secret.
|
||||
# 2. running on the forked repository would use unnecessary GitHub Action time.
|
||||
if: ${{ github.repository == 'karmada-io/karmada' }}
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
|
|
@ -8,6 +8,10 @@ permissions:
|
|||
jobs:
|
||||
publish-image-to-dockerhub:
|
||||
name: publish to DockerHub
|
||||
# prevent job running from forked repository, otherwise
|
||||
# 1. running on the forked repository would fail as missing necessary secret.
|
||||
# 2. running on the forked repository would use unnecessary GitHub Action time.
|
||||
if: ${{ github.repository == 'karmada-io/karmada' }}
|
||||
permissions:
|
||||
id-token: write # To be able to get OIDC ID token to sign images.
|
||||
strategy:
|
||||
|
|
|
@ -206,6 +206,10 @@ jobs:
|
|||
GH_TOKEN: ${{ github.token }}
|
||||
needs:
|
||||
- release-assests
|
||||
# prevent job running from forked repository, otherwise
|
||||
# 1. running on the forked repository would use unnecessary GitHub Action time.
|
||||
# 2. running on the forked repository would open a PR to publish an inaccurate version of karmada in repo kubernetes-sigs/krew-index.
|
||||
if: ${{ github.repository == 'karmada-io/karmada' }}
|
||||
name: Update krew-index
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
|
|
Loading…
Reference in New Issue