Skip to content

Commit

Permalink
more action changes'
Browse files Browse the repository at this point in the history
  • Loading branch information
zachrundle committed Aug 11, 2024
1 parent a4d6d7c commit 55b7d02
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 47 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/tf-fmt-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: tfactions
on:
push:
branches:
- main
pull_request:
jobs:
tfactions:
name: tfactions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}

- name: Terraform fmt
id: fmt
run: terraform fmt -check
continue-on-error: true
39 changes: 0 additions & 39 deletions .github/workflows/tfactions.yml

This file was deleted.

21 changes: 13 additions & 8 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,21 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const { issue, repo } = github.context;
const comment = `
const tfsecResults = process.env.TFSEC_RESULTS;
const issueNumber = github.context.payload.pull_request.number;
const repoName = github.context.repo.repo;
const repoOwner = github.context.repo.owner;
const commentBody = `
## tfsec Scan Summary
\`\`\`
${process.env.TFSEC_RESULTS}
${tfsecResults}
\`\`\`
`;
github.rest.issues.createComment({
issue_number: issue.number,
owner: repo.owner,
repo: repo.repo,
body: comment,
await github.rest.issues.createComment({
owner: repoOwner,
repo: repoName,
issue_number: issueNumber,
body: commentBody,
});

0 comments on commit 55b7d02

Please sign in to comment.