chore(actions): prevent run on fork

This commit is contained in:
lisonge 2023-10-04 00:57:53 +08:00
parent ef42474c53
commit dc5abe7277
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,8 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
# prevent run on fork
- if: github.repository == 'gkd-kit/subscription'
uses: google-github-actions/release-please-action@v3
with:
release-type: node

View File

@ -7,7 +7,8 @@ on:
jobs:
release:
if: ${{ startsWith(github.event.head_commit.message, 'chore(main):') && contains(github.event.head_commit.message, 'release') }}
# prevent run on fork
if: ${{ github.repository == 'gkd-kit/subscription' && startsWith(github.event.head_commit.message, 'chore(main):') && contains(github.event.head_commit.message, 'release') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3