-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.25 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Continuous Deployment
on:
# workflow_run:
# workflows: ["Build"]
# types:
# - completed
workflow_dispatch: {}
jobs:
build-and-deploy-base-image:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Trigger Deploy Base
uses: actions/github-script@v6
with:
script: |
const workflow_id = 'deploy-base.yml';
const owner = context.repo.owner;
const repo = context.repo.repo;
await github.actions.createWorkflowDispatch({
owner,
repo,
workflow_id,
ref: 'main'
});
build-and-deploy-microservice-images:
runs-on: ubuntu-latest
needs: build-and-deploy-base-image
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Trigger Deploy Base
uses: actions/github-script@v6
with:
script: |
const workflow_id = 'deploy-microservices.yml';
const owner = context.repo.owner;
const repo = context.repo.repo;
await github.actions.createWorkflowDispatch({
owner,
repo,
workflow_id,
ref: 'main'
});