-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.18 KB
/
review_and_deploy.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "Review and deploy"
on:
pull_request:
push:
branches:
- master
- deploy_to_staging
- deploy_to_clients
- deploy_to_production
concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: false
jobs:
target_name:
runs-on: ubuntu-latest
outputs:
name: ${{steps.branch_name.outputs.current_branch}}
steps:
- uses: actions/checkout@v4
- name: Get branch name
id: branch_name
uses: tj-actions/[email protected]
staging:
uses: ./.github/workflows/deploy.yml
needs:
- target_name
if: ${{needs.target_name.outputs.name == 'deploy_to_staging'}}
with:
AWS_REGION: eu-west-1
ENVIRONMENT: "staging"
PRODUCT: "idos"
PROJECT: "kwil"
secrets:
AWS_ACCESS_KEY_ID: ${{secrets.STAGING_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.STAGING_AWS_SECRET_ACCESS_KEY}}
SLACK_BOT_TOKEN: ${{secrets.SLACK_BOT_TOKEN}}
DOCKER_HUB_USERNAME: ${{secrets.DOCKER_HUB_USERNAME}}
DOCKER_HUB_PASSWORD: ${{secrets.DOCKER_HUB_PASSWORD}}
clients:
uses: ./.github/workflows/deploy.yml
needs:
- target_name
if: ${{false}} # Temporarily disabled
with:
AWS_REGION: eu-west-1
ENVIRONMENT: "clients"
PRODUCT: "idos"
PROJECT: "kwil"
secrets:
AWS_ACCESS_KEY_ID: ${{secrets.STAGING_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.STAGING_AWS_SECRET_ACCESS_KEY}}
SLACK_BOT_TOKEN: ${{secrets.SLACK_BOT_TOKEN}}
DOCKER_HUB_USERNAME: ${{secrets.DOCKER_HUB_USERNAME}}
DOCKER_HUB_PASSWORD: ${{secrets.DOCKER_HUB_PASSWORD}}
production:
uses: ./.github/workflows/deploy.yml
needs:
- target_name
if: ${{false}} # Temporarily disabled
with:
AWS_REGION: eu-west-1
ENVIRONMENT: "production"
PRODUCT: "idos"
PROJECT: "kwil"
secrets:
AWS_ACCESS_KEY_ID: ${{secrets.PRODUCTION_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY}}
SLACK_BOT_TOKEN: ${{secrets.SLACK_BOT_TOKEN}}
DOCKER_HUB_USERNAME: ${{secrets.DOCKER_HUB_USERNAME}}
DOCKER_HUB_PASSWORD: ${{secrets.DOCKER_HUB_PASSWORD}}