Skip to content

Commit

Permalink
Github Actions (#2)
Browse files Browse the repository at this point in the history
github action for deploying CFTs in support of quick create stacks
  • Loading branch information
thathaneydude authored Feb 26, 2024
1 parent 6a5f4d9 commit 4d29682
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches-ignore:
- main
jobs:
deploy-aws-cfts:
name: Deploy CFTs to Dev S3
runs-on: ubuntu-latest
env:
S3_BUCKET: dev-corelight-cloud-public-templates
AWS_ROLE: arn:aws:iam::046444305225:role/github-oidc-provider-aws
AWS_REGION: us-east-2
steps:
- uses: actions/checkout@v4
- name: Assume Role
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
role-duration-seconds: 1200
- name: Push Files
run: |
aws s3 cp cloud-native-iac/AWS/*.yaml s3://${{ env.S3_BUCKET }}
permissions:
id-token: write
contents: read
26 changes: 26 additions & 0 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches:
- main
jobs:
deploy-aws-cfts:
name: Deploy CFTs to Dev S3
runs-on: ubuntu-latest
env:
S3_BUCKET: corelight-cloud-public-templates
AWS_ROLE: arn:aws:iam::657159205431:role/cloud-public-templates-deploy
AWS_REGION: us-east-1
steps:
- uses: actions/checkout@v4
- name: Assume Role
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
role-duration-seconds: 1200
- name: Push Files
run: |
aws s3 cp cloud-native-iac/AWS/*.yaml s3://${{ env.S3_BUCKET }}
permissions:
id-token: write
contents: read
File renamed without changes.
File renamed without changes.

0 comments on commit 4d29682

Please sign in to comment.