This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
}); |