Skip to content

Commit

Permalink
chore: update GitHub Actions workflow to skip builds for changes in s…
Browse files Browse the repository at this point in the history
…pecific folders (#2200)

* Update GitHub Actions workflow to skip builds for changes in specific folders

- Enhanced the workflow to skip the build process if changes are detected only within the `e2e-tests/` or `.ibm/` folders.
- Improved the regex logic in the "Determine Changed Files" step to streamline conditional build execution.

Signed-off-by: Gustavo Lira <[email protected]>

* Update GitHub Actions workflow to skip builds for changes in specific folders

- Enhanced the workflow to skip the build process if changes are detected only within the `e2e-tests/` or `.ibm/` folders.
- Improved the regex logic in the "Determine Changed Files" step to streamline conditional build execution.

Signed-off-by: Gustavo Lira <[email protected]>

---------

Signed-off-by: Gustavo Lira <[email protected]>
  • Loading branch information
gustavolira authored Jan 16, 2025
1 parent 350a58b commit 9bbee7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr-build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ jobs:
echo "Changed files:"
echo "$CHANGED_FILES"
if echo "$CHANGED_FILES" | grep -qv '^e2e-tests/'; then
echo "Changes detected outside the e2e-tests folder. Proceeding with the build."
if echo "$CHANGED_FILES" | grep -qvE '^(e2e-tests/|\.ibm/)'; then
echo "Changes detected outside the e2e-tests or .ibm folders. Proceeding with the build."
echo "proceed_with_build=true" >> $GITHUB_ENV
else
echo "No changes outside the e2e-tests folder. Skipping the build."
echo "No changes outside the e2e-tests or .ibm folders. Skipping the build."
echo "proceed_with_build=false" >> $GITHUB_ENV
fi
Expand Down

0 comments on commit 9bbee7b

Please sign in to comment.