-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6682 from opengovsg/release_v6.74.1
build: release v6.74.1
- Loading branch information
Showing
82 changed files
with
23,328 additions
and
288 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: AWS Deploy Scanner | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
description: 'Deployment environment' | ||
required: true | ||
type: string | ||
provisionedConcurrency: | ||
description: 'Provisioned concurrency' | ||
required: true | ||
type: number | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
virus-scanner: | ||
name: virus scanner serverless | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source code from specified branch if it is a scheduled run | ||
uses: actions/checkout@v3 | ||
if: ${{ github.event_name == 'schedule' }} | ||
with: | ||
ref: ${{ inputs.environment }} | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
if: ${{ github.event_name != 'schedule' }} | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-scanner-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node-scanner- | ||
${{ runner.OS }}-node- | ||
- name: Configure AWS credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
role-to-assume: ${{ secrets.AWS_CI_ROLE_TO_ASSUME }} | ||
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||
|
||
- name: Install node dependencies | ||
working-directory: ./serverless/virus-scanner | ||
run: npm ci | ||
|
||
- name: Deploy with Serverless Framework | ||
working-directory: ./serverless/virus-scanner | ||
env: | ||
ENV: ${{ inputs.environment }} | ||
CONCURRENCY: ${{ inputs.provisionedConcurrency }} | ||
run: npm run deploy |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy to production | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
# schedule builds for 12:00AM GMT+8 everyday to get latest virus definitions | ||
schedule: | ||
- cron: '0 16 * * *' | ||
|
||
jobs: | ||
deploy-scanner: | ||
name: Deploy Scanner | ||
uses: ./.github/workflows/aws-deploy-scanner.yml | ||
with: | ||
environment: 'production' | ||
provisionedConcurrency: 5 | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy to staging | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
# schedule builds for 12:00AM GMT+8 everyday to get latest virus definitions | ||
schedule: | ||
- cron: '0 16 * * *' | ||
|
||
jobs: | ||
deploy-scanner: | ||
name: Deploy Scanner | ||
uses: ./.github/workflows/aws-deploy-scanner.yml | ||
with: | ||
environment: 'staging' | ||
provisionedConcurrency: 1 | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy to uat | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- uat | ||
# schedule builds for 12:00AM GMT+8 everyday to get latest virus definitions | ||
schedule: | ||
- cron: '0 16 * * *' | ||
|
||
jobs: | ||
deploy-scanner: | ||
name: Deploy Scanner | ||
uses: ./.github/workflows/aws-deploy-scanner.yml | ||
with: | ||
environment: 'uat' | ||
provisionedConcurrency: 1 | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.12.1 |
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
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
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.