Deploy main to NOFOs #48
This file contains hidden or 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
| 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/**" | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: Environment to deploy to | |
| required: true | |
| default: "dev" | |
| type: choice | |
| options: | |
| - dev | |
| - staging | |
| - 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 | |
| needs: [checks] | |
| # needs: [checks, vulnerability-scans] <= enable when vulnerability scans have started passing | |
| uses: ./.github/workflows/deploy-nofos.yml | |
| with: | |
| environment: ${{ inputs.environment || 'dev' }} | |
| version: ${{ inputs.version || 'main' }} | |
| send-slack-notification: | |
| if: failure() | |
| needs: [checks, deploy, vulnerability-scans] | |
| uses: ./.github/workflows/send-slack-notification.yml | |
| secrets: inherit |