Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 0 additions & 75 deletions .github/workflows/staging-deploy.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/staging-docker-build-push.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/staging-post-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Staging — Post deployment"

on:
push:
branches:
- main
paths-ignore:
- "tests/**"

# Limit execution to 1 and also makes new trigger events cancel currently running workflow
concurrency:
group: staging-post-deployment
cancel-in-progress: true

permissions:
contents: write
security-events: write

jobs:
generate-sbom:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Build Docker image
run: docker build --platform=linux/amd64 --provenance false -t forms-api .

- name: Docker generate SBOM
uses: cds-snc/security-tools/.github/actions/generate-sbom@837a88b6337d4842543184c8eac97a8adac8f302 # v4.0.3
env:
TRIVY_DB_REPOSITORY: ${{ vars.TRIVY_DB_REPOSITORY }}
with:
docker_image: "forms-api"
dockerfile_path: "Dockerfile"
token: "${{ secrets.GITHUB_TOKEN }}"

report-to-sentinel:
runs-on: ubuntu-latest
steps:
- name: Report deployment to Sentinel
uses: cds-snc/sentinel-forward-data-action@343498df663a056249bd96f260265aa80691b747 # main
with:
input_data: '{"product": "forms", "sha": "${{ github.sha }}", "version": "${{ github.sha }}", "repository": "${{ github.repository }}", "environment": "staging", "status": "${{ job.status }}"}'
log_type: CDS_Product_Deployment_Data
log_analytics_workspace_id: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
log_analytics_workspace_key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
3 changes: 1 addition & 2 deletions .github/workflows/workflow-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Workflow failure
on:
workflow_run:
workflows:
- "Staging - Deploy"
- "Staging — Docker build and push"
- "Staging — Post deployment"
- "Production - Deploy"
- "Production — Docker build and push"
types:
Expand Down
Loading