-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: check for changes before triggering actions for deployment and bu…
…ild (#337) - Only triggers build for infrastructure when files in `.azure` folder has changed - Only triggers build for backend services when files in `src` folder has changed --------- Co-authored-by: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com>
- Loading branch information
1 parent
234a34c
commit 77a3538
Showing
4 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: "Check for changes" | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
hasAzureChanges: | ||
description: "Azure related files changed" | ||
value: ${{ jobs.check-for-changes.outputs.hasAzureChanges }} | ||
hasBackendChanges: | ||
description: "Backend related files changed" | ||
value: ${{ jobs.check-for-changes.outputs.hasBackendChanges }} | ||
|
||
jobs: | ||
check-for-changes: | ||
name: Filter | ||
runs-on: ubuntu-latest | ||
outputs: | ||
hasBackendChanges: ${{ steps.paths-filter.outputs.backend == 'true' }} | ||
hasAzureChanges: ${{ steps.paths-filter.outputs.azure == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dorny/paths-filter@v2 | ||
id: paths-filter | ||
with: | ||
base: ${{ github.ref }} | ||
filters: | | ||
backend: | ||
- 'src/**/*' | ||
azure: | ||
- '.azure/**/*' | ||
# todo: add additional files that should trigger a build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters