Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiraalA authored Apr 8, 2024
1 parent fbfbc93 commit 5ca4540
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
name: Update Pull Request
on:
pull_request:

jobs:
update_pull_request:
runs-on: ubuntu-latest
steps:
- name: Terraform Format
run: terraform fmt -check
id: fmt

- name: Terraform Initialize
run: terraform init
id: init

- name: Terraform Plan
run: terraform plan
id: plan
continue-on-error: true

- name: Create Pull Request Comment
if: always()
uses: actions/[email protected]
env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `
#### Terraform Format and Style 🖌 \`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️ \`${{ steps.init.outcome }}\`
#### Terraform Plan 📖 \`${{ steps.plan.outcome }}\`
<details><summary>Show Plan</summary>
\`\`\`
${process.env.PLAN}
\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})

0 comments on commit 5ca4540

Please sign in to comment.