-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.41 KB
/
ccpp.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
name: C/C++ CI
on: [push]
jobs:
compile_normal:
runs-on: ubuntu-latest
steps:
- name: Pull
uses: actions/checkout@v1
- name: Compile to binary
run: make build
compile_prometheus:
runs-on: ubuntu-latest
steps:
- name: Pull
uses: actions/checkout@v1
- name: Compile to binary
run: make build_prometheus
build_normal:
name: Build without Prometheus
if: contains(github.ref, 'master')
runs-on: ubuntu-latest
steps:
- name: Pull
uses: actions/checkout@master
- name: Build Docker image
run: docker build --build-arg buildType=build_static -t lol3r/c-http-server:latest .
- name: Login to Repo
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: Publish
run: docker push lol3r/c-http-server:latest
build_prometheus:
name: Build with Prometheus
if: contains(github.ref, 'master')
runs-on: ubuntu-latest
steps:
- name: Pull
uses: actions/checkout@master
- name: Build Docker image
run: docker build --build-arg buildType=build_prometheus_static -t lol3r/c-http-server:latest-prometheus .
- name: Login to Repo
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: Publish
run: docker push lol3r/c-http-server:latest-prometheus