forked from oauth2-proxy/oauth2-proxy
-
Notifications
You must be signed in to change notification settings - Fork 5
93 lines (80 loc) · 1.93 KB
/
ci.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
89
90
91
92
93
name: CI
on:
push:
branches:
- "pics"
paths-ignore:
- "docs/**"
- "VERSION"
- ".bumpversion.cfg"
- "**.md"
- "catalog-info.yaml"
- "mkdocs.yml"
- "philips-repo.yaml"
pull_request:
branches: [pics]
paths-ignore:
- "docs/**"
- "VERSION"
- ".bumpversion.cfg"
- "**.md"
- "catalog-info.yaml"
- "mkdocs.yml"
- "philips-repo.yaml"
workflow_dispatch:
jobs:
Lint:
name: Lint - golangci-lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
Tests:
name: Tests - Executing unit tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract branch name
uses: vazco/github-actions-branch-name@v1
id: branch
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: 1.19.x
id: go
- name: Downloads golang mods
run: |
go mod download
- name: Verify Code Generation
run: |
make verify-generate
- name: Build
run: |
make build
- name: Test
run: |
make test
Build:
needs: [Tests, Lint]
name: Build - Building and publishig Docker images
runs-on: ubuntu-22.04
outputs:
oauth2proxyPRTag: ${{ steps.setVariables.outputs.prTag }}
oauth2proxyCITag: ${{ steps.setVariables.outputs.betaTag }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: ${{ github.workspace }}
push: false
tags: docker.eu1.hsdp.io/reporting:${{ github.run_id }}