Fetch AWS Management Account resources only when explicitly selected … #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish-CloudFormation | |
on: | |
push: | |
branches: | |
- main | |
- "[0-9]+.[0-9]+" | |
paths: | |
- deploy/cloudformation/*.yml | |
- scripts/publish_cft.sh | |
- .github/workflows/publish-cloudformation.yml | |
jobs: | |
publish_cloudformation: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.CSPM_CFT_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.CSPM_CFT_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Upload to S3 if elastic-agent CloudFormation template has changed | |
run: scripts/publish_cft.sh |