Skip to content

Commit

Permalink
Update workflows to better filter changes, removed edited trigger fro…
Browse files Browse the repository at this point in the history
…m release.yaml (#221)
  • Loading branch information
masesdevelopers authored Mar 1, 2024
1 parent 6812e66 commit 9e1f49d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ jobs:
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "src/"* ]]; then
if [[ $added_modified_file == "src/net/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "test/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ jobs:
run: |
mapfile -d ',' -t added_modified_files < <(printf '%s,' '${{ steps.get_changed_files.outputs.added_modified }}')
for added_modified_file in "${added_modified_files[@]}"; do
if [[ $added_modified_file == "src/"* ]]; then
if [[ $added_modified_file == "src/net/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "test/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ jobs:
run: |
mapfile -d ',' -t added_modified_files < <(printf '%s,' '${{ steps.get_changed_files.outputs.added_modified }}')
for added_modified_file in "${added_modified_files[@]}"; do
if [[ $added_modified_file == ".github/workflows/build.yaml"* ]]; then
echo "$added_modified_file is myself."
if [[ $added_modified_file == ".github/workflows/pullrequest.yaml"* ]]; then
echo "$added_modified_file file changed"
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "src/"* ]]; then
if [[ $added_modified_file == "src/net/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "test/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "run_build_windows=true" >> $GITHUB_OUTPUT
break
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
release:
types:
- published
- edited
# - edited

jobs:
# This workflow contains a single job called "build_release"
Expand Down

0 comments on commit 9e1f49d

Please sign in to comment.