Skip to content

Jmm/1729 sp_framework fields #467

Jmm/1729 sp_framework fields

Jmm/1729 sp_framework fields #467

---
name: Pull Request Checks
on:
pull_request:
branches:
- main
- prod
paths:
- '**'
- '!docs/**'
- 'docs/bpmn-workflow-models/**'
workflow_dispatch: null
jobs:
check-for-changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
requirements: ${{ steps.filter.outputs.requirements }}
dev-requirements: ${{ steps.filter.outputs.devrequirements }}
docker: ${{ steps.filter.outputs.docker }}
package: ${{ steps.filter.outputs.package }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
requirements:
- './backend/requirements.txt'
devrequirements:
- './backend/dev-requirements.txt'
docker:
- './backend/Dockerfile'
package:
- './backend/package.json'
# Tests and Linting invoked on a Pull Request
testing-from-build:
needs: [check-for-changes]
if: ${{ needs.check-for-changes.outputs.requirements == 'true' || needs.check-for-changes.outputs.dev-requirements == 'true' || needs.check-for-changes.outputs.docker == 'true' || needs.check-for-changes.outputs.package == 'true' }}
uses: ./.github/workflows/testing-from-build.yml
secrets: inherit
testing-from-ghcr:
needs: [check-for-changes]
if: ${{ needs.check-for-changes.outputs.requirements != 'true' && needs.check-for-changes.outputs.dev-requirements != 'true' && needs.check-for-changes.outputs.docker != 'true' && needs.check-for-changes.outputs.package != 'true' }}
uses: ./.github/workflows/testing-from-ghcr.yml
secrets: inherit
linting:
uses: ./.github/workflows/linting.yml
secrets: inherit
# Update BPMN Diagrams
sync-BPMN:
uses: ./.github/workflows/add-bpmn-renders.yml
secrets: inherit
# Generate Terraform Plans
terraform-plan:
if: ${{ github.base_ref == 'main' }}
uses: ./.github/workflows/terraform-plan-env.yml
with:
environment: "dev"
secrets: inherit
terraform-plan-meta:
if: ${{ github.base_ref == 'main' }}
uses: ./.github/workflows/terraform-plan-env.yml
with:
environment: "meta"
secrets: inherit
terraform-plan-staging:
if: ${{ github.base_ref == 'prod' }}
uses: ./.github/workflows/terraform-plan-env.yml
with:
environment: "staging"
secrets: inherit
# uses tags "v1.*"
terraform-plan-prod:
if: ${{ github.base_ref == 'prod' }}
uses: ./.github/workflows/terraform-plan-env.yml
with:
environment: "production"
secrets: inherit
repo-event:
if: ${{ github.base_ref == 'prod' }}
name: Set Repository Event
permissions:
contents: write
runs-on: ubuntu-latest
needs: [terraform-plan-staging, testing-from-ghcr]
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: ready-to-merge
client-payload: '{"github": ${{ toJson(github) }}}'
if: github.event_name == 'pull_request'