-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.57 KB
/
preview.yaml
File metadata and controls
54 lines (51 loc) · 1.57 KB
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
name: Preview
on:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update apt index
run: sudo apt-get update
- name: Install cloud-init
run: sudo apt-get install -y cloud-init
- name: Lint cloud-init file
run: |
if ! cloud-init schema -c cloud-init.yaml 2> >(tee stderr.log) >> $GITHUB_STEP_SUMMARY
then
# Print errors as such in GitHub logs.
cat stderr.log | grep "in.*line.*column" -B1 -A1 --no-group-separator | sed -z 's/\([^\n]*\)\n\s*in "\([^"]*\)", line \([[:digit:]]\+\), column \([[:digit:]]\+\):\s*/::error file=cloud-init.yaml,title=\1 in \2,line=\3,col=\4::/g'
exit 1
fi
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- uses: pulumi/actions@v6
with:
command: preview
stack-name: holochain/nomad-server
comment-on-pr: true
diff: true
github-token: ${{ secrets.HRA2_GITHUB_TOKEN }}
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.HRA2_PULUMI_ACCESS_TOKEN }}
ci_pass:
if: always()
needs:
- lint
- preview
runs-on: Ubuntu-latest
steps:
- name: Decide whether the required jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}