-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into clean-master
- Loading branch information
Showing
223 changed files
with
4,735 additions
and
7,613 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
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,45 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
# | ||
# OpenCRVS is also distributed under the terms of the Civil Registration | ||
# & Healthcare Disclaimer located at http://opencrvs.org/license. | ||
# | ||
# Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS. | ||
name: Listen for labels added to PRs | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
dispatch-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if added label is "🚀 Ready to deploy" | ||
id: label_check | ||
run: | | ||
added_label=$(jq -r '.label.name' "$GITHUB_EVENT_PATH") | ||
if [[ "$added_label" != "🚀 Ready to deploy" ]]; then | ||
echo "Label not found or incorrect, skipping dispatch." | ||
exit 1 | ||
fi | ||
echo "Correct label added, dispatching deploy workflow." | ||
- name: Trigger Deploy Workflow | ||
if: steps.label_check.outcome == 'success' | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const prNumber = context.payload.pull_request.number; | ||
const result = await github.rest.actions.createWorkflowDispatch({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
workflow_id: 'deploy-to-feature-environment.yml', | ||
ref: context.payload.pull_request.head.ref, | ||
inputs: { | ||
pr_number: prNumber.toString(), | ||
} | ||
}); | ||
console.log(result); |
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,25 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
# | ||
# OpenCRVS is also distributed under the terms of the Civil Registration | ||
# & Healthcare Disclaimer located at http://opencrvs.org/license. | ||
# | ||
# Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS. | ||
name: Publish toolkit to NPM registry | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch_name: | ||
description: Branch to publish from | ||
default: develop | ||
required: true | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
publish: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: Placeholder for publish | ||
run: echo "Placeholder for publish" |
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 |
---|---|---|
|
@@ -12,7 +12,9 @@ on: | |
push: | ||
branches: | ||
- develop | ||
- release-* | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
# Run every day at midnight | ||
- cron: '0 0 * * *' | ||
|
@@ -47,6 +49,20 @@ jobs: | |
scan-ref: '.' | ||
trivy-config: trivy.yaml | ||
|
||
security-scan-manual: | ||
if: github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Trivy vulnerability scanner in fs mode | ||
uses: aquasecurity/[email protected] | ||
with: | ||
scan-type: 'fs' | ||
scan-ref: '.' | ||
trivy-config: trivy.yaml | ||
|
||
security-scan-pull-request: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-22.04 | ||
|
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.