Skip to content

Commit

Permalink
Update CI workflow to check for changes in 'ruby/' directory
Browse files Browse the repository at this point in the history
  • Loading branch information
catatsuy committed Dec 29, 2024
1 parent 40fcf1d commit 59abef5
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 59abef5

Please sign in to comment.