-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (66 loc) · 2.47 KB
/
main.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
56
57
58
59
60
61
62
63
64
65
66
67
68
name: main
on:
pull_request:
branches: ['*']
push:
branches: ['*']
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: pre-commit/[email protected]
jinja-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install jinja libraries
run: |
python -m pip install --upgrade jinja2==3.0.1
- name: Install jinja linter tool
run: git clone --single-branch https://github.com/drm/jinja2-lint.git /tmp/jinja2-lint && pushd /tmp/jinja2-lint && git checkout 75dcd5a
- name: Execute jinja linter
run: find . -type f -name "*.j2" -exec /tmp/jinja2-lint/j2lint.py '{}' +
deploy-agoradev-common:
if: github.ref == 'refs/heads/main'
needs: [pre-commit, jinja-lint]
uses: "./.github/workflows/aws-deploy.yaml"
with:
role-to-assume: "arn:aws:iam::607346494281:role/sagebase-github-oidc-agora-infra-deploy"
sceptre-command: "sceptre launch common --prune --yes"
deploy-agoradev:
if: github.ref == 'refs/heads/main'
needs: [deploy-agoradev-common]
uses: "./.github/workflows/aws-deploy.yaml"
with:
role-to-assume: "arn:aws:iam::607346494281:role/sagebase-github-oidc-agora-infra-deploy"
sceptre-command: "sceptre launch agoradev/develop --prune --yes"
deploy-agoraprod-common:
if: github.ref == 'refs/heads/main'
needs: [deploy-agoradev]
uses: "./.github/workflows/aws-deploy.yaml"
with:
role-to-assume: "arn:aws:iam::681175625864:role/sagebase-github-oidc-agora-infra-deploy"
sceptre-command: "sceptre launch common --prune --yes"
deploy-agoraprod-staging:
if: github.ref == 'refs/heads/main'
needs: [deploy-agoraprod-common]
uses: "./.github/workflows/aws-deploy.yaml"
with:
role-to-assume: "arn:aws:iam::681175625864:role/sagebase-github-oidc-agora-infra-deploy"
sceptre-command: "sceptre launch agoraprod/staging --prune --yes"
deploy-agoraprod-prod:
if: github.ref == 'refs/heads/main'
needs: [deploy-agoraprod-staging]
uses: "./.github/workflows/aws-deploy.yaml"
with:
role-to-assume: "arn:aws:iam::681175625864:role/sagebase-github-oidc-agora-infra-deploy"
sceptre-command: "sceptre launch agoraprod/prod --prune --yes"