Skip to content

Commit 13b0048

Browse files
committed
this better
1 parent a89263c commit 13b0048

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@ jobs:
1919
- name: Login to docker
2020
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
2121
- name: Generate IaC from Main Branch
22+
env:
23+
APPCD_TOKEN: ${{ secrets.APPCD_TOKEN }}
24+
APPCD_URL: ${{ secrets.APPCD_URL }}
2225
run: |
2326
mkdir -p artifact/main/
2427
docker run --rm \
2528
--workdir=/code \
29+
-e APPCD_TOKEN=$APPCD_TOKEN \
30+
-e APPCD_URL=$APPCD_URL \
2631
-v ./main_branch:/code \
2732
-v ./artifact/main:/artifact/main \
2833
--entrypoint=appcd \
2934
ghcr.io/appcd-dev/appcd-dist/appcd-cli:v0.9.1 \
30-
generate --lang Python --output=artifact/main/.appcd/charts --iac-type Helm
35+
generate --mode ci --lang Python --output=/artifact/main/.appcd/charts --iac-type Helm
3136
cd artifact/main/.appcd/charts
3237
unzip DogeAPI.zip && rm DogeAPI.zip
3338
- name: Checkout PR Branch
@@ -42,16 +47,21 @@ jobs:
4247
- name: echo branch name
4348
run: echo ${{ steps.extract_branch.outputs.branch }}
4449
- name: Generate IaC from PR branch
50+
env:
51+
APPCD_TOKEN: ${{ secrets.APPCD_TOKEN }}
52+
APPCD_URL: ${{ secrets.APPCD_URL }}
4553
run: |
4654
docker pull ghcr.io/appcd-dev/appcd-dist/appcd-cli:v0.9.0
4755
mkdir -p artifact/${{ steps.extract_branch.outputs.branch }}/
4856
docker run --rm \
4957
--workdir=/code \
5058
-v ./pr_branch/:/code \
5159
-v ./artifact/${{ steps.extract_branch.outputs.branch }}:/artifact/${{ steps.extract_branch.outputs.branch }} \
60+
-e APPCD_TOKEN=$APPCD_TOKEN \
61+
-e APPCD_URL=$APPCD_URL \
5262
--entrypoint=appcd \
5363
ghcr.io/appcd-dev/appcd-dist/appcd-cli:v0.9.1 \
54-
generate --lang Python --iac-type Helm --output=artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts
64+
generate --mode ci --lang Python --iac-type Helm --output=/artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts
5565
cd artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts
5666
unzip DogeAPI.zip && rm DogeAPI.zip
5767
- name: Copy infrastructure files if empty

0 commit comments

Comments
 (0)