Skip to content

Deploy main to NOFOs dev #379

Deploy main to NOFOs dev

Deploy main to NOFOs dev #379

Workflow file for this run

name: Deploy NOFOs
run-name: Deploy ${{ inputs.version || 'main' }} to NOFOs ${{ inputs.environment }}
on:
push:
branches:
- "main"
paths:
- ".github/workflows/*-nofos.yml"
- "infra/nofos/**"
- "infra/modules/**"
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: Environment to deploy to
required: true
default: "dev"
type: choice
options:
- dev
- training
- prod
version:
description: "git reference to deploy (e.g., a branch, tag, or commit SHA)"
required: true
default: "main"
type: string
jobs:
checks:
name: Checks
uses: ./.github/workflows/ci-nofos.yml
with:
version: ${{ inputs.version || 'main' }}
vulnerability-scans:
name: Vulnerability Scans
needs: [checks]
uses: ./.github/workflows/vulnerability-scans-nofos.yml
deploy:
name: Deploy
if: github.event_name != 'push' || inputs.environment != null
needs: [checks, vulnerability-scans]
uses: ./.github/workflows/deploy-nofos.yml
strategy:
max-parallel: 1
fail-fast: false
matrix:
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod", "training"]' || '["dev"]') }}
with:
environment: ${{ matrix.envs }}
version: ${{ inputs.version || github.ref || 'main' }}
send-slack-notification:
if: failure()
needs: [checks, deploy, vulnerability-scans]
uses: ./.github/workflows/send-slack-notification.yml
secrets: inherit