Skip to content

Commit cfad4f4

Browse files
committed
Debug
1 parent b080ff1 commit cfad4f4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/appcd-iac-pr-diff.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,19 @@ jobs:
6464
path: ./artifact/pr_artifacts
6565
- name: Generate diff between Main and PR branch
6666
run: |
67+
tree
6768
mkdir -p pr_branch/deployment_files
68-
mv ./artifact/main/ pr_branch/deployment_files/
69-
cd pr_branch
69+
cd ./artifact/main/
70+
git init
7071
git config --local user.email "bot@appcd.com"
7172
git config --local user.name "AppCD Bot"
72-
git add deployment_files
73+
git add .
7374
git commit -m "staging deployment files from main to compare them"
74-
rm -rf deploment_files
75-
cd ..
76-
mkdir -p pr_branch/deployment_files/
77-
cp -R artifact/pr_artifacts/ pr_branch/deployment_files/
78-
cd pr_branch
75+
rm -rf *
76+
cp -R ../pr_artifacts .
7977
git add .
80-
git diff --staged --output=../diff.txt deployment_files/ | cat
81-
cat ../diff.txt
78+
git diff --staged --output=../../diff.txt . | cat
79+
cat ../../diff.txt
8280
- name: Comment PR with IaC Changes
8381
uses: actions/github-script@v6
8482
with:

0 commit comments

Comments
 (0)