Skip to content

Commit 466b629

Browse files
committed
this better
1 parent a89263c commit 466b629

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

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

+13-2
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,22 @@ 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
37+
ls -latr
3238
unzip DogeAPI.zip && rm DogeAPI.zip
3339
- name: Checkout PR Branch
3440
uses: actions/checkout@v4
@@ -42,16 +48,21 @@ jobs:
4248
- name: echo branch name
4349
run: echo ${{ steps.extract_branch.outputs.branch }}
4450
- name: Generate IaC from PR branch
51+
env:
52+
APPCD_TOKEN: ${{ secrets.APPCD_TOKEN }}
53+
APPCD_URL: ${{ secrets.APPCD_URL }}
4554
run: |
4655
docker pull ghcr.io/appcd-dev/appcd-dist/appcd-cli:v0.9.0
4756
mkdir -p artifact/${{ steps.extract_branch.outputs.branch }}/
4857
docker run --rm \
4958
--workdir=/code \
5059
-v ./pr_branch/:/code \
5160
-v ./artifact/${{ steps.extract_branch.outputs.branch }}:/artifact/${{ steps.extract_branch.outputs.branch }} \
61+
-e APPCD_TOKEN=$APPCD_TOKEN \
62+
-e APPCD_URL=$APPCD_URL \
5263
--entrypoint=appcd \
5364
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
65+
generate --mode ci --lang Python --iac-type Helm --output=/artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts
5566
cd artifact/${{ steps.extract_branch.outputs.branch }}/.appcd/charts
5667
unzip DogeAPI.zip && rm DogeAPI.zip
5768
- name: Copy infrastructure files if empty

0 commit comments

Comments
 (0)