Skip to content

Commit

Permalink
Protect against release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Mar 9, 2022
1 parent 045dd4b commit fa83198
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
add_version_to_database:
name: Add version to database
# Skip running release workflow on forks
if: github.repository_owner == 'taichi-dev' && github.event_name == 'workflow_dispatch'
if: github.repository == 'taichi-dev/taichi' && github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions misc/upload_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def upload_artifact(is_taichi):


if __name__ == '__main__':
if os.getenv('GITHUB_REPOSITORY', 'taichi-dev/taichi') != 'taichi-dev/taichi':
sys.exit(0)
is_taichi = os.getenv('PROJECT_NAME', 'taichi') == 'taichi'
upload_artifact(is_taichi)
if is_taichi:
Expand Down

0 comments on commit fa83198

Please sign in to comment.