Skip to content

feat: portal administration application #13

feat: portal administration application

feat: portal administration application #13

Workflow file for this run

name: Check Changes in client/apps
on:
pull_request:
branches:
- "*"
push:
branches:
- "*"
jobs:
check-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all commit history for proper comparison
- name: Fetch all branches
run: git fetch --all # Ensure all branches are fetched
- name: Check for changes in /client/apps
id: check_changes
run: |
# Check if we're in a pull request or push context
if [ "${{ github.event_name }}" == "pull_request" ]; then
# For pull requests, compare the base and head refs
git diff --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} | grep -q "^client/apps/"
else
# For push events, compare with the previous commit
git diff --name-only HEAD^ HEAD | grep -q "^client/apps/"
fi
if [ $? -eq 0 ]; then
echo "Changes detected in client/apps/"
echo "::set-output name=changes_detected::true"
else
echo "No changes detected in client/apps/"
echo "::set-output name=changes_detected::false"
fi
- name: Output result
run: |
echo "Changes in client/apps: ${{ steps.check_changes.outputs.changes_detected }}"