-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathci-pull-request.dhall
59 lines (45 loc) · 1.22 KB
/
ci-pull-request.dhall
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
{-
Template to generate the `.github/workflows/previews.yml` CI file
-}
let Prelude = ./Prelude.dhall
let Actions = ./workflows.dhall
let A = ./apps.dhall
let container = ./container.dhall
let App = A.App
let apps = A.apps
let previewUrl = "https://deploy-previews.ksfmedia.fi/\${{ github.sha }}"
let promote = "false"
let apps-to-cache = Prelude.List.filter App.Type Actions.hasLockfile apps
let checkCISteps = Actions.checkCISteps
let steps-gs =
Actions.setupSteps Actions.Env.Staging
# Actions.cacheSteps apps-to-cache
# Actions.buildSteps apps
# Actions.uploadSteps Actions.Env.Staging apps
let previewLinks =
[ Actions.linkPreviewsStep
apps
previewUrl
]
in { name = "previews"
, on.pull_request.branches = [ "master" ]
, jobs =
{ check-ci =
{ runs-on = "ubuntu-latest", container, steps = checkCISteps }
, deploy-gs =
{ runs-on = "ubuntu-latest"
, container
, steps = steps-gs
, needs = "check-ci"
}
, previews =
{ runs-on = "ubuntu-latest"
, steps = previewLinks
, needs =
[ "deploy-gs"]
}
}
, env =
{ NODE_ENV = "production"
}
}