-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (39 loc) · 1.13 KB
/
master.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
name: checker-staging-fly
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deploy:
name: Deploy to fly.io
runs-on: ubuntu-latest
environment: ${{ github.workflow }}
env:
BINARY_NAME: "checker"
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
CONFIG: ${{ secrets.CONFIG }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Create fly.io app if not exist
uses: superfly/[email protected]
# the only way to automatically create new app, with this dirty hack. :(
continue-on-error: true
with:
args: "apps create ${{ github.workflow }}"
- name: Upload config
uses: superfly/[email protected]
with:
args: "secrets set -a ${{ github.workflow }} --detach CHECKER_CONFIG=- < ${CONFIG}"
- name: Deploy to fly.io
uses: superfly/[email protected]
with:
args: "deploy -a ${{ github.workflow }}"