Skip to content

Commit 6372312

Browse files
committed
new files track
1 parent e0d155d commit 6372312

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,19 @@ jobs:
8888
- name: Generate diff between Main and PR branch
8989
run: |
9090
mkdir -p pr_branch/deployment_files
91-
mv ./artifact/main/.appcd pr_branch/deployment_files/
91+
mv ./artifact/main/.appcd/charts/helm/scan_*/* pr_branch/deployment_files/
9292
cd pr_branch
9393
git config --local user.email "action@github.com"
9494
git config --local user.name "GitHub Action"
9595
git add deployment_files
9696
git commit -m "staging deployment files from main to compare them"
97-
rm -rf deploment_files/*
98-
rm -rf deployment_files/.appcd
97+
rm -rf deploment_files
9998
cd ..
100-
mv artifact/${{ steps.extract_branch.outputs.branch }}/.appcd pr_branch/deployment_files/
99+
mkdir -p pr_branch/deployment_files/
100+
mv artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts/helm/scan_*/* pr_branch/deployment_files/
101101
cd pr_branch
102-
git diff --output=../diff.txt deployment_files/ | cat
102+
git add .
103+
git diff --staged --output=../diff.txt deployment_files/ | cat
103104
cat ../diff.txt
104105
- name: Comment PR with IaC Changes
105106
uses: actions/github-script@v6

0 commit comments

Comments
 (0)