-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.48 KB
/
develop.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# 🔧 Development Workflows
# ========================
#
# Note: for these workflows to succeed, the following secrets must be
# installed in the repository (or inherited from the repository's
# organization):
#
# - `AWS_ACCESS_KEY_ID` — access key for Amazon Web Services of the account to
# which to deliver this software
# - `AWS_SECRET_ACCESS_KEY` — secret key to go with `AWS_ACCESS_KEY_ID`
# - `ADMIN_GITHUB_TOKEN` — Personal access token of a user with collaborator
# or better access to the project repository.
---
name: 🔧 Development
# Driving Event
# -------------
#
# What event starts this workflow: a push to `develop`
on:
push:
branches:
- develop
paths-ignore:
- 'CHANGELOG.md'
- 'docs/requirements/**'
workflow_dispatch:
# TBD: Should we have a `concurrency` with other workflows?
# What to Do
# ----------
#
# Deliver to run in AWS (whether this is an EC2, Fargate, or something else is
# up to the Terraform files).
jobs:
development-delivery:
name: 📪 Development Delivery
if: github.actor != 'pdsen-ci'
runs-on: ubuntu-latest
steps:
-
name: 💳 Checkout
uses: actions/checkout@v2
with:
lfs: true
token: ${{secrets.ADMIN_GITHUB_TOKEN}}
fetch-depth: 0
-
name: 🌍 Terraform Setup
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.8.4"
-
name: 🔬 Terraform initialization and validation
run: |
terraform init -no-color
terraform validate -no-color
-
name: 💥 Terraform destruction of any existing delivery
run: terraform apply -destroy -no-color -auto-approve
continue-on-error: true
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
-
name: 🛫 Terraform application of new delivery
run: terraform apply -no-color -auto-approve
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
...
# -*- mode: yaml; indent: 4; fill-column: 120; coding: utf-8 -*-