-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (48 loc) · 1.72 KB
/
ci.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
name: CI
on:
push:
branches:
- develop
- test/**
pull_request:
workflow_dispatch:
jobs:
lint:
# Run GH Super-Linter against code base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cat .github/super-linter.env >> $GITHUB_ENV
- name: Lint Code Base
uses: github/super-linter@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: master
build:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v3
# Set staging bucket if on develop or test, otherwise it won't be set
# which is fine for a test build
- run: echo "ECHOLOCATOR_SETTINGS_BUCKET=echo-locator-stgdjango-config-us-east-1" >> $GITHUB_ENV
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/test/')
- uses: aws-actions/configure-aws-credentials@v1
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/test/')
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: "us-east-1"
- run: ./scripts/bootstrap
if: github.ref != 'refs/heads/master'
- run: ./scripts/cibuild
- run: ./scripts/cipublish
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/test/')
- run: |
docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm terraform -c "
unset AWS_PROFILE
./scripts/infra plan
./scripts/infra apply
"
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/test/')