-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
75 additions
and
0 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
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
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,49 @@ | ||
--- | ||
# A reusable workflow that is used to detect whether code changes | ||
# are relevant for czishrink and/or czicompress. | ||
# See | ||
# - https://github.com/dorny/paths-filter#examples | ||
# - https://docs.github.com/en/actions/using-workflows/reusing-workflows | ||
name: subproject-changes | ||
|
||
# Required permissions | ||
permissions: | ||
pull-requests: read | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
event_name: | ||
required: true | ||
type: string | ||
outputs: | ||
czishrink: | ||
description: "true if the change affects czishrink or if event_name is not 'pull_request'; false otherwise" | ||
value: ${{ inputs.event_name != 'pull_request' || jobs.changes.outputs.czishrink == 'true' }} | ||
czicompress: | ||
description: "true if the change affects czicompress or if event_name is not 'pull_request'; false otherwise" | ||
value: ${{ inputs.event_name != 'pull_request' || jobs.changes.outputs.czishrink == 'true' }} | ||
|
||
jobs: | ||
# JOB to run change detection | ||
changes: | ||
if: ${{ inputs.event_name == 'pull_request' }} | ||
runs-on: ubuntu-latest | ||
# Set job outputs to values from filter step | ||
outputs: | ||
czishrink: ${{ steps.filter.outputs.czishrink }} | ||
czicompress: ${{ steps.filter.outputs.czicompress }} | ||
steps: | ||
# For pull requests it's not necessary to checkout the code | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
czishrink: | ||
- 'czishrink/**' | ||
- '.github/**' | ||
- '*.yml' | ||
czicompress: | ||
- '**czicompress**' | ||
- '.github/**' | ||
- '*.yml' |