Skip to content

Commit 201b53b

Browse files
committed
update for PR branch
1 parent b55b4b7 commit 201b53b

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

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

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
ref: main
2020
path: main_branch
2121
fetch-depth: 1
22-
- name: Generate IAC
22+
- name: Generate IAC for main branch
2323
env:
2424
APPCD_TOKEN: ${{ secrets.APPCD_TOKEN }}
2525
APPCD_URL: ${{ secrets.APPCD_URL }}
@@ -46,25 +46,17 @@ jobs:
4646
run: echo "branch=$(basename ${{ github.head_ref}})" >> $GITHUB_OUTPUT
4747
- name: echo branch name
4848
run: echo ${{ steps.extract_branch.outputs.branch }}
49-
- name: Generate IaC from PR branch
49+
- name: Generate IAC for PR branch
5050
env:
5151
APPCD_TOKEN: ${{ secrets.APPCD_TOKEN }}
5252
APPCD_URL: ${{ secrets.APPCD_URL }}
53-
run: |
54-
docker pull ghcr.io/appcd-dev/appcd-dist/appcd-cli:cli
55-
mkdir -p artifact/${{ steps.extract_branch.outputs.branch }}/ ./artifact/tmp
56-
docker run --rm \
57-
--workdir=/app/scan \
58-
-v ./pr_branch/:/app/scan \
59-
-v ./artifact/${{ steps.extract_branch.outputs.branch }}:/artifact/${{ steps.extract_branch.outputs.branch }} \
60-
-v ./artifact/tmp:/tmp \
61-
-e APPCD_TOKEN=$APPCD_TOKEN \
62-
-e APPCD_URL=$APPCD_URL \
63-
--entrypoint=appcd \
64-
ghcr.io/appcd-dev/appcd-dist/appcd-cli:cli \
65-
generate --mode ci --log 2 --output=/artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts
66-
cd artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts
67-
unzip scan.zip && rm scan.zip && ls -latr
53+
uses: appcd-dev/action@v0.0.1
54+
with:
55+
cloud: 'aws'
56+
language: 'Python'
57+
outputDir: './artifact/${{ steps.extract_branch.outputs.branch }}'
58+
scanPath: './pr_branch'
59+
targetCompute: 'k8s'
6860
- name: Upload logs
6961
uses: actions/upload-artifact@v2
7062
with:

0 commit comments

Comments
 (0)