Skip to content

Commit

Permalink
Updated the workflow so it only gets triggered if it is push to main …
Browse files Browse the repository at this point in the history
…or if it's a PR
  • Loading branch information
Farshad DASHTI authored and Farshad DASHTI committed Dec 19, 2024
1 parent 179d0fc commit f92202c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/pack-utilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:

jobs:
build-and-package:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: >
github.event.workflow_run.conclusion == 'success' &&
(
(github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.event == 'push') ||
github.event.workflow_run.event == 'pull_request'
)
uses: ./.github/workflows/nuget-package-template.yml
with:
project_name: DfE.CoreLibs.Utilities
Expand Down

0 comments on commit f92202c

Please sign in to comment.