-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (43 loc) · 1.19 KB
/
build_on_pr.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
name: Build_on_tag
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Prepare SSH for endly
run: |
mkdir ~/.secret
mkdir ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
ssh-keygen -t ed25519 -f id_rsa -P "" -f ~/.secret/id_rsa
cat ~/.secret/id_rsa.pub >> ~/.ssh/authorized_keys
echo "set enable-bracketed-paste off" >> ~/.inputrc
cat >>~/.ssh/config <<END
Host localhost
IdentityFile ~/.secret/id_rsa
StrictHostKeyChecking no
END
- name: Test
run: make test
- name: Build
run: make build -e version=${{ github.sha }}
- name: Get Endly
run: make get_endly
- name: Run E2E tests
run: make test_endly
- name: Install
run: make install -e version=${{ github.sha }}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.3.1
with:
name: goslmailer-${{ github.sha }}
path: build/goslmailer-${{ github.sha }}/