-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.75 KB
/
rsv-dossier-orchestration.yaml
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
52
53
54
55
# Please do not edit this file.
# Build steps can be customized in the rsv-dossier-build.yaml.
# More information under https://docs.ionos.space/docs/github-actions-customization/
# version: 2022-07-21
name: "Deploy Now: Orchestration"
run-name: "Deploy Now: Build rsv-dossier · ${{ github.event.head_commit.message || format('Triggered by {0}', github.triggering_actor) }}"
on:
- push
- workflow_dispatch
jobs:
retrieve-project:
name: check readiness
runs-on: ubuntu-latest
outputs:
deployment-enabled: ${{ fromJson(steps.project.outputs.info).deployment-enabled }}
branch-id: ${{ fromJson(steps.project.outputs.info).branch-id }}
steps:
- name: Fetch project data
uses: ionos-deploy-now/project-action@v1
id: project
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: 7f049c81-4a8c-472e-abaa-e4d8d3a9229d
action: retrieve-info
build:
name: build
needs: retrieve-project
if: ${{ needs.retrieve-project.outputs.deployment-enabled == 'true' }}
uses: ./.github/workflows/rsv-dossier-build.yaml
with:
site-url: https://IONOS_DEPLOY_NOW_SITE_URL
branch-id: ${{ needs.retrieve-project.outputs.branch-id }}
secrets: inherit
deploy:
name: trigger deployment
needs:
- retrieve-project
- build
runs-on: ubuntu-latest
steps:
- name: Dispatch deployment(s)
uses: ionos-deploy-now/project-action@v1
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: 7f049c81-4a8c-472e-abaa-e4d8d3a9229d
branch-id: ${{ needs.retrieve-project.outputs.branch-id }}
action: dispatch-deployments