-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.43 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
REGION: us-east-1
environment: main
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Setup Cloud Formation Linter with Latest Version
uses: scottbrenner/cfn-lint-action@v2
- name: Print the Cloud Formation Linter Version & Run Linter.
run: |
cfn-lint --version
cfn-lint -t ./template.yml
- uses: aws-actions/setup-sam@v2
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.REGION }}
- run: |
cd ./functions/codeScanningToSlack
npm cache clean --force
npm install
npm run build
- run: |
cd ./functions/githubWebhookIPValidator
npm cache clean --force
npm install
npm run build
- run: sam build --use-container
- run: sam deploy --debug --no-confirm-changeset --no-fail-on-empty-changeset --stack-name codeScanning --capabilities CAPABILITY_IAM --region ${{ env.REGION }} --resolve-s3