-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (84 loc) · 2.58 KB
/
master-ci.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
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
name: master CI
on:
push:
branches: [ master ]
jobs:
changes:
runs-on: ubuntu-20.04
outputs:
source: ${{ steps.filter.outputs.source }}
docs: ${{ steps.filter.outputs.docs }}
helm: ${{ steps.filter.outputs.helm }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: ".github/path_filter.yaml"
generate-snapshot-tag:
name: Generate snapshot tag
runs-on: ubuntu-20.04
outputs:
snapshot-tag: ${{ steps.generate-snapshot-tag.outputs.snapshot-tag }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup just
uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.github-token }}
with:
just-version: 1.5.0
- name: Generate snapshot tag
id: generate-snapshot-tag
run: echo "snapshot-tag=$(just print-dev-version)" >> $GITHUB_OUTPUT
build-and-test-source:
name: Build and test project source
runs-on: ubuntu-20.04
needs: [ changes, generate-snapshot-tag ]
if: ${{ needs.changes.outputs.source == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Test Source
uses: ./.github/actions/test-source
with:
disable-integration-test: false
build-and-push-images:
name: Build and push images
runs-on: ubuntu-20.04
needs: [ changes, generate-snapshot-tag, build-and-test-source ]
if: ${{ needs.changes.outputs.source == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Push images
uses: ./.github/actions/push-docker-images
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
token: ${{ secrets.DOCKERHUB_TOKEN }}
tag: ${{ needs.generate-snapshot-tag.outputs.snapshot-tag }}
publish-dev-docs:
name: Update gh-pages
runs-on: ubuntu-20.04
needs: [ changes ]
if: ${{ needs.changes.outputs.docs == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update gh-pages
uses: ./.github/actions/update-docs
with:
token: ${{ secrets.GH_TOKEN }}
publish-dev-helm:
name: Publish dev helm chart
needs: [ changes, generate-snapshot-tag ]
if: ${{ needs.changes.outputs.helm == 'true' }}
uses: ./.github/workflows/update-helm-chart.yml
secrets:
github-token: ${{ secrets.GH_TOKEN }}