Skip to content

Commit 2b5fe32

Browse files
Workflow: Build Test: Update with new configuration
Signed-off-by: Immanuel Raj <iamimmanuelraj@gmail.com>
1 parent 76daf6b commit 2b5fe32

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ jobs:
2525
cd /home/frappe
2626
su frappe bash -c "bench init frappe-bench --skip-redis-config-generation --no-procfile --skip-assets"
2727
28+
- name: Get Dependent Apps
29+
run: |
30+
cd /home/frappe/frappe-bench
31+
# Use public URL for public repos, authenticated URL for private repos
32+
if [ "${{ github.event.pull_request.head.repo.private }}" = "false" ]; then
33+
# This is a public repository (could be a fork or not)
34+
git clone https://github.com/${{ github.event.pull_request.head.repo.full_name }} -b ${{ github.event.pull_request.head.ref }} --depth=1 app_repo
35+
else
36+
# Private repository, use authentication
37+
git clone https://rtbot:${{ secrets.RTBOT_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }} -b ${{ github.event.pull_request.head.ref }} --depth=1 app_repo
38+
fi
39+
DEPS=$(grep -E "required_apps\s*=\s*\[" app_repo/*/hooks.py | sed 's/.*\[\(.*\)\]/\1/g' | tr -d '"' | tr -d "'" | tr ',' '\n' | awk '{$1=$1};1')
40+
rm -rf app_repo
41+
for dep in $DEPS; do
42+
su frappe bash -c "bench get-app $dep"
43+
done
44+
2845
- name: Get APP and Build
2946
run: |
3047
cd /home/frappe/frappe-bench

0 commit comments

Comments
 (0)