Browse Source

fix: infracost v2 migration

Moritz Johner 3 years ago
parent
commit
847edc3ec3
1 changed files with 11 additions and 5 deletions
  1. 11 5
      .github/workflows/e2e-managed.yml

+ 11 - 5
.github/workflows/e2e-managed.yml

@@ -149,13 +149,19 @@ jobs:
         api-key: ${{ secrets.INFRACOST_API_KEY }}
 
     - name: Generate Infracost JSON for provider
-      run: infracost breakdown --path terraform/${{github.event.client_payload.slash_command.args.named.provider}}/plan.json --format json --out-file /tmp/infracost.json
+      run: |
+        infracost breakdown \
+          --path terraform/${{github.event.client_payload.slash_command.args.named.provider}}/plan.json \
+          --format json \
+          --out-file /tmp/infracost.json
 
     - name: Post Infracost comment
-      uses: infracost/actions/comment@v2
-      with:
-        path: /tmp/infracost.json
-        behavior: update
+      run: |
+        infracost comment github --path=/tmp/infracost.json \
+          --repo=$GITHUB_REPOSITORY \
+          --github-token=${{ secrets.GITHUB_TOKEN }} \
+          --pull-request=${{ github.event.client_payload.pull_request.number }} \
+          --behavior=update
 
     - name: Apply TF
       run: |-