Skip to content

Commit

Permalink
restrict certain workflows to only run in main repo (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
akphi authored Nov 21, 2023
1 parent fa8a291 commit 737135b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build-showcases-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ env:
REPO_NAME: ${{ github.event.repository.name }}

jobs:
website-build:
build-index:
name: Build Showcase Index
# There is currently no way to limit workflow dispatch to only allow default branch
# so we need to restrict it here
# See https://github.community/t/limit-branch-for-workflow-dispatch/122099
if: github.ref == 'refs/heads/master' && github.repository == 'finos/legend'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- "**"

jobs:
website-build:
build-website:
name: Build Website
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ env:
REPO_NAME: ${{ github.event.repository.name }}

jobs:
website-build:
publish-website:
name: Publish Website
# There is currently no way to limit workflow dispatch to only allow default branch
# so we need to restrict it here
# See https://github.community/t/limit-branch-for-workflow-dispatch/122099
if: github.ref == 'refs/heads/master' && github.repository == 'finos/legend'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand Down

0 comments on commit 737135b

Please sign in to comment.