-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (43 loc) · 1.24 KB
/
staging.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
name: Staging
on:
push:
branches: [staging]
jobs:
staging_build_and_push:
name: Staging Build and Push
runs-on: ubuntu-latest
container: docker:20-dind
steps:
- uses: actions/checkout@v2
- run: |
apk add util-linux pciutils usbutils coreutils binutils findutils grep bash
apk add python3
apk add --update py3-pip
pip3 install awscli
chmod -R +x ./CI/scripts
bash ./CI/scripts/build_and_push.sh staging
staging_plan:
name: Staging Plan
needs: staging_build_and_push
runs-on: ubuntu-latest
container: ronya3data/rony-ci:0.0.1-terraform1.0.3
steps:
- uses: actions/checkout@v2
- name: terraform plan
run: |
chmod -R +x ./CI/scripts
./CI/scripts/plan.sh staging
staging_apply:
name: Staging Apply
needs: staging_plan
runs-on: ubuntu-latest
container: ronya3data/rony-ci:0.0.1-terraform1.0.3
steps:
- uses: actions/checkout@v2
- name: terraform apply
run: |
chmod -R +x ./CI/scripts
./CI/scripts/apply.sh staging -auto-approve
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}