Skip to content

Commit

Permalink
Trigger workflow jobs only on the main organization repo. (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zifah authored Aug 7, 2024
1 parent b054981 commit 6410b6d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/api-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
fetch-vars:
if: github.repository_owner == 'Yorubaname'
runs-on: ubuntu-latest
environment: staging
outputs:
Expand All @@ -16,6 +17,7 @@ jobs:
- run: echo "Exposing vars to reusable workflow."

deploy:
if: github.repository_owner == 'Yorubaname'
needs: fetch-vars
uses: ./.github/workflows/deploy-dotnet-service-ec2.yml
secrets: inherit
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-dotnet-service-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ on:

jobs:
deploy:
if: github.repository_owner == 'Yorubaname'
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/website-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
fetch-vars:
if: github.repository_owner == 'Yorubaname'
runs-on: ubuntu-latest
environment: staging
outputs:
Expand All @@ -16,6 +17,7 @@ jobs:
- run: echo "Exposing vars to reusable workflow."

deploy:
if: github.repository_owner == 'Yorubaname'
needs: fetch-vars
uses: ./.github/workflows/deploy-dotnet-service-ec2.yml
secrets: inherit
Expand Down

0 comments on commit 6410b6d

Please sign in to comment.