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 d53360d commit a4d6d7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Extract tfsec results
id: extract
run: |
results=$(grep -A 6 "results" ${{ steps.tfsec.outputs.report }} | tail -n 6)
results=$(grep -A 6 "results" tfsec_output.txt | tail -n 6)
echo "TFSEC_RESULTS<<EOF" >> $GITHUB_ENV
echo "$results" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand All @@ -33,15 +33,16 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const { issue, repo } = github.context;
const comment = `
## tfsec Scan Summary
\`\`\`
${process.env.TFSEC_RESULTS}
\`\`\`
`;
github.rest.issues.createComment({
issue_number: github.context.issue.number,
owner: github.context.repo.owner,
repo: github.context.repo.repo,
issue_number: issue.number,
owner: repo.owner,
repo: repo.repo,
body: comment,
});
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ resource "aws_s3_bucket" "my_bucket" {
bucket = "test-bucket-42353242213123"
tags = {
Name = "MyS3Bucket"
Environment = "Dev"
Environment = "Dev"
}
}

0 comments on commit a4d6d7c

Please sign in to comment.