diff --git a/.github/workflows/deploy-service.yml b/.github/workflows/deploy-service.yml index 98ea53d..2013fe3 100644 --- a/.github/workflows/deploy-service.yml +++ b/.github/workflows/deploy-service.yml @@ -2,6 +2,14 @@ name: Service Deploy run-name: 'Service Deploy [service: ${{ inputs.service }}, env: ${{ inputs.env }}]' on: + workflow_call: + inputs: + service: + required: true + type: string + env: + required: true + type: string workflow_dispatch: inputs: service: diff --git a/.github/workflows/deploy-services.yml b/.github/workflows/deploy-services.yml new file mode 100644 index 0000000..5844f4d --- /dev/null +++ b/.github/workflows/deploy-services.yml @@ -0,0 +1,43 @@ +name: Services Deploy (all) +run-name: 'Services Deploy (all) [env: ${{ inputs.env }}]' + +on: + workflow_dispatch: + inputs: + env: + description: 'Deployment target environment' + type: choice + required: true + options: + - dev + - test + - staging + - prod + +permissions: + id-token: write + contents: read + +jobs: + job-service: + uses: ./.github/workflows/deploy-service.yml + with: + env: ${{ inputs.env }} + service: job-service + secrets: inherit + + user-service: + uses: ./.github/workflows/deploy-service.yml + with: + env: ${{ inputs.env }} + service: user-service + secrets: inherit + + research-service: + uses: ./.github/workflows/deploy-service.yml + with: + env: ${{ inputs.env }} + service: research-service + secrets: inherit + + diff --git a/README.md b/README.md index cae5048..2e22601 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ and main branches. * For deployment to AWS: * Add a Dockerfile in the new app directory. A simple copy and modify from user-service is sufficient * Add the new service name to the "service" workflow input options in `deploy-service.yml` + * Add a new job to `deploy-services.yml` to include the new services in the "all" service deployment workflow. * In AWS: * Add ECR repositories for each env (follow the naming scheme from user-service, e.g. `terramatch-microservices/foo-service-staging`, etc) * Set the repo to Immutable