Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI workflow to check for changes in 'ruby/' directory #901

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ jobs:
id: check-changes
run: |
git fetch origin
if git diff --name-only origin/master...${{ github.sha }} | grep 'ruby/'; then
CHANGED_FILES=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...HEAD)
if echo "$CHANGED_FILES" | grep 'ruby/'; then
echo "Changes detected in ruby directory"
echo "ruby_changes_detected=true" >> $GITHUB_OUTPUT
exit 0
fi

- name: Download purl
Expand All @@ -51,7 +53,7 @@ jobs:
- name: Update compose.yml if changes are detected
if: steps.check-changes.outputs.ruby_changes_detected == 'true'
run: |
purl -overwrite -replace '@dockerfile: go/@dockerfile: ruby/@' ./webapp/compose.yml
purl -fail -overwrite -replace '@dockerfile: go/@dockerfile: ruby/@' ./webapp/compose.yml

- name: Start the server
run: |
Expand Down
Loading