Skip to content

Commit a223f2c

Browse files
feature: this commit removes specific deployment and PR validation workflows for stores, subscriptions, and contracts, replacing them with a generic parameterized workflow.
1 parent d8ebd9e commit a223f2c

9 files changed

Lines changed: 86 additions & 225 deletions

.github/workflows/contracts-pr-validation.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/contracts-publish-artifact.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/deploy-stores-production.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/deploy-subscriptions-production.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: workflow — trigger production deployment
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
service_path:
7+
required: true
8+
type: string
9+
10+
image_name:
11+
required: true
12+
type: string
13+
14+
deploy_url_secret:
15+
required: true
16+
type: string
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
22+
defaults:
23+
run:
24+
working-directory: ${{ inputs.service_path }}
25+
26+
steps:
27+
- name: checkout
28+
uses: actions/checkout@v4
29+
30+
- name: build docker image
31+
run: docker build -t ${{ inputs.image_name }}:latest .
32+
33+
- name: login docker hub
34+
uses: docker/login-action@v3
35+
with:
36+
username: ${{ secrets.DOCKERHUB_USERNAME }}
37+
password: ${{ secrets.DOCKERHUB_TOKEN }}
38+
39+
- name: push docker image
40+
run: docker push ${{ inputs.image_name }}:latest
41+
42+
- name: deploy webhook
43+
run: curl -X POST ${{ secrets[inputs.deploy_url_secret] }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: workflow — trigger comanda.subscriptions production deployment
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- 'Boundaries/Comanda.Subscriptions/**'
8+
9+
jobs:
10+
call-deploy:
11+
uses: ./.github/workflows/production-deployment.yml
12+
with:
13+
service_path: Boundaries/Comanda.Subscriptions
14+
image_name: httpsrichardy/comanda.subscriptions
15+
deploy_url_secret: SUBSCRIPTIONS_PRODUCTION_DEPLOY_URL
16+
secrets: inherit

.github/workflows/stores-pr-validation.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/subscriptions-pr-validation.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

docker-compose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,33 @@ services:
102102
Settings__Observability__SeqServerUrl: ${SEQ_SERVERURL}
103103
Settings__Observability__SentryDsn: ${SENTRY_DSN}
104104

105+
comanda.boundaries.profiles:
106+
container_name: "comanda.boundaries.profiles"
107+
build:
108+
context: ./Boundaries/Comanda.Profiles/
109+
dockerfile: Dockerfile
110+
env_file:
111+
- .env
112+
ports:
113+
- "5005:8080"
114+
depends_on:
115+
- comanda.infrastructure.federation
116+
- comanda.infrastructure.seq
117+
environment:
118+
# database settings
119+
Settings__Database__ConnectionString: ${COMANDA_MONGO_CONNECTIONSTRING}
120+
Settings__Database__DatabaseName: ${COMANDA_MONGO_DATABASENAME}
121+
122+
# federation settings
123+
Settings__Federation__BaseUrl: ${COMANDA_FEDERATION_BASEURL}
124+
Settings__Federation__Realm: ${COMANDA_FEDERATION_REALM}
125+
Settings__Federation__ClientId: ${COMANDA_FEDERATION_CLIENTID}
126+
Settings__Federation__ClientSecret: ${COMANDA_FEDERATION_CLIENTSECRET}
127+
128+
# observability settings
129+
Settings__Observability__SeqServerUrl: ${SEQ_SERVERURL}
130+
Settings__Observability__SentryDsn: ${SENTRY_DSN}
131+
105132
volumes:
106133
comanda.infrastructure.mongo:
107134
comanda.infrastructure.seq:

0 commit comments

Comments
 (0)