-
Notifications
You must be signed in to change notification settings - Fork 178
88 lines (72 loc) · 1.88 KB
/
ci-pipeline.yaml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI Pipeline
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
jobs:
build_binaries:
name: Build Binaries
runs-on: ubuntu-20.04
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.8
- name: Checkout Code
uses: actions/checkout@v4
- name: Build
run: |
export PATH="$GOBIN:$PATH"
. build.sh
env:
ARTIFACTS: ${{ runner.temp }}/artifacts
shell: bash
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: binaries
path: ${{ runner.temp }}/artifacts/binaries
linux:
name: Linux
runs-on: ubuntu-20.04
needs: build_binaries
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: binaries
path: artifacts/binaries
- name: Run Docker Tests
run: . run-docker-tests-linux.sh
shell: bash
- name: Build Docker Images
run: ./build-images-linux.sh
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
shell: bash
windows:
name: Windows
runs-on: windows-2022
needs: build_binaries
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: binaries
path: artifacts/binaries
# Uncomment this step if needed once windows docker tests are implemented
# - name: Run Docker Tests (Windows)
# run: .\run-docker-tests-windows.sh
# shell: bash
- name: Build Docker Images
run: ./build-images-windows.sh
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
shell: bash