From 391cf2eeeedc6c038d1a5b15e378f9d8d90b14c5 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 11 Nov 2024 16:35:54 -0800 Subject: [PATCH 1/2] [TM-1448] Try triggering job service build from new action --- .github/workflows/deploy-service.yml | 8 +++++ .github/workflows/deploy-services.yml | 43 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/deploy-services.yml 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 + + From d7a8f1a4ff6a53a7964311b5b52223484de5deaf Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 11 Nov 2024 17:03:52 -0800 Subject: [PATCH 2/2] [TM-1448] Update the README. --- README.md | 1 + 1 file changed, 1 insertion(+) 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