Skip to content

Commit

Permalink
testing key
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Morgan committed Oct 18, 2024
1 parent 5441a3c commit 5a2671c
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/infracost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ jobs:
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize')
runs-on: ubuntu-latest
environment: production

permissions:
contents: read
pull-requests: write # Required to post comments

steps:

- name: Setup Infracost
uses: infracost/actions/setup@v3
with:
Expand Down Expand Up @@ -50,26 +51,4 @@ jobs:
--repo=$GITHUB_REPOSITORY \
--github-token=${{ github.token }} \
--pull-request=${{ github.event.pull_request.number }} \
--behavior=update
# Run Infracost on default branch and update Infracost Cloud
infracost-default-branch-update:
name: Infracost Default Branch Update
if: github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master')
runs-on: ubuntu-latest
steps:
- name: Setup Infracost
uses: infracost/actions/setup@v3
with:
api-key: ${{ secrets.INFRACOST_API_KEY }}

- name: Checkout main/master branch
uses: actions/checkout@v4

- name: Run Infracost on default branch and update Infracost Cloud
run: |
infracost breakdown --path=. \
--format=json \
--out-file=infracost.json
infracost upload --path=infracost.json || echo "Always pass main branch runs even if there are policy failures"
--behavior=update

0 comments on commit 5a2671c

Please sign in to comment.