Skip to content

Commit

Permalink
Added permissions to write to sarif file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Aug 20, 2024
1 parent 4a1f273 commit 268ed6c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/aws-template-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
scan:
name: Scan TF Code
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish-infra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Infra

on:
# PR targeting master is created or new commits are pushed
push:
branches:
- master
paths:
- "infrastructure/**"

# Manual trigger via GH Actions UI
workflow_dispatch:
inputs:
environment:
description: "Select target environment"
required: true
default: "dev"
type: choice
options:
- dev
- test
- prod

jobs:
deploy:
uses: ./.github/workflows/aws-template-terraform.yml
with:
CONTEXT_FOLDER: "./infrastructure/cloud/environments/${{ inputs.environment }}"
CHANGE_FOLDER_NAME: environments/${{ inputs.environment }}
ENVIRONMENT_NAME: ${{ inputs.environment }}
TEST_BUCKET_NAME: jasper-test-bucket
secrets: inherit

0 comments on commit 268ed6c

Please sign in to comment.