-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.04 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
name: Release
on:
push:
branches:
- master
jobs:
deploy-prod:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Write ssh key
run: |
echo "${{ secrets.SSH_KEY }}" > ${{ runner.temp }}/ssh.key
chmod 0600 ${{ runner.temp }}/ssh.key
- name: Run Ansible playbooks
run: yarn prod:apply _all -e ansible_user=github-runner --private-key ${{ runner.temp }}/ssh.key
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_PRIVATE_KEY }}
ANSIBLE_HOST_KEY_CHECKING: "false"
e2e-prod-local:
uses: homecentr/e2e/.github/workflows/run-e2e.yml@master
needs:
- deploy-prod
with:
environment: prod
client: local
secrets:
sops_age_key: ${{ secrets.SOPS_AGE_PRIVATE_KEY }}
e2e-prod-remote:
uses: homecentr/e2e/.github/workflows/run-e2e.yml@master
needs:
- deploy-prod
with:
environment: prod
client: remote
secrets:
sops_age_key: ${{ secrets.SOPS_AGE_PRIVATE_KEY }}