-
Notifications
You must be signed in to change notification settings - Fork 7
107 lines (97 loc) · 2.82 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on: [push]
jobs:
scan:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/[email protected]
- uses: securego/[email protected]
with:
args: "-no-fail -fmt sarif -out results.sarif ./..."
- uses: github/codeql-action/[email protected]
with:
sarif_file: results.sarif
test:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: stable
- run: make lint test
e2e:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
packages: write
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: stable
- name: Create kind cluster
uses: helm/[email protected]
with:
cluster_name: kind
- run: make test-e2e
continue-on-error: true
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Get manager logs
run: kubectl logs -n cloudflare-gateway deployment/cloudflare-controller-manager
- name: Upload conformance report
uses: actions/[email protected]
with:
name: conformance-report
path: '*-report.yaml'
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- run: make docker-push IMG=ghcr.io/pl4nty/cloudflare-kubernetes-gateway:$(git describe --tag --always --match 'v[0-9]*')
release-please:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
steps:
- uses: googleapis/[email protected]
id: release
release:
needs:
- release-please
if: ${{ needs.release-please.outputs.releases_created == 'true' || startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: actions/[email protected]
with:
go-version: stable
- uses: goreleaser/[email protected]
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ github.token }}