-
-
Notifications
You must be signed in to change notification settings - Fork 78
38 lines (36 loc) · 1.31 KB
/
ci-prod.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
name: CI-prod
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy-prod:
concurrency: deploy
runs-on: ubuntu-latest
container: haxe/haxelib_devcontainer_workspace:${{ github.sha }}
env:
AWS_DEFAULT_REGION: eu-west-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
SPACES_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY_ID }}
SPACES_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_ACCESS_KEY }}
TF_VAR_HAXELIB_DB_PASS: ${{ secrets.TF_VAR_HAXELIB_DB_PASS }}
TF_INPUT: 0
TF_IN_AUTOMATION: 1
steps:
- uses: actions/checkout@v2
- name: Verify image existence
run: docker manifest inspect haxe/lib.haxe.org:${{ github.sha }}
- name: Initialize Terraform
run: terraform init
working-directory: terraform
- name: Ensure no pending infra changes
run: terraform plan -refresh=false -detailed-exitcode
working-directory: terraform
- name: Set haxelib-server image
run: terraform apply -auto-approve -refresh=false
working-directory: terraform
env:
TF_VAR_HAXELIB_SERVER_IMAGE_MASTER: haxe/lib.haxe.org:${{ github.sha }}