-
Notifications
You must be signed in to change notification settings - Fork 3
161 lines (150 loc) · 4.94 KB
/
Copy pathci.yaml
File metadata and controls
161 lines (150 loc) · 4.94 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Skaffold - test
on:
pull_request:
branches:
- main
paths:
- .github/workflows/ci.yaml
- .github/workflows/release.yaml
- "**/Dockerfile*"
- "**/skaffold.yaml"
- "**/skaffold.yml"
- "**/*.py"
- "**/*.toml"
- "**/*.sql"
- "**/*.go"
- "**/*.gomod"
- "**/*.html"
- "**/*.js"
- "**/*.jsx"
- "**/*.css"
- "**/package.json"
- "**/package-lock.json"
env:
SKAFFOLD_VER: v2.17.0
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Skaffold Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
platform: [linux/amd64]
steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: # we need it for skaffold build
fetch-depth: "0"
fetch-tags: "true"
persist-credentials: false
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
id: changes
with:
filters: |
ci-dashboard:
- 'ci-dashboard/**'
cost-insight:
- 'cost-insight/**'
roster:
- 'roster/**'
cloudevents-server:
- 'cloudevents-server/**'
tibuild:
- 'tibuild/**'
dl:
- 'dl/**'
publisher:
- 'publisher/**'
chatops:
- 'chatops-lark/**'
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
with:
driver-opts: |
image=moby/buildkit:v0.12.4
- name: Log in to the Container registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup skaffold
run: |
curl -Lo skaffold "https://storage.googleapis.com/skaffold/releases/${SKAFFOLD_VER}/skaffold-linux-amd64" && \
sudo install skaffold /usr/local/bin/
rm -f skaffold
- name: Build image - cloudevents-server
if: steps.changes.outputs.cloudevents-server == 'true'
working-directory: cloudevents-server
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps
- name: Build image - ci-dashboard
if: steps.changes.outputs.ci-dashboard == 'true'
working-directory: ci-dashboard
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps
- name: Build image - cost-insight
if: steps.changes.outputs.cost-insight == 'true'
working-directory: cost-insight
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps
- name: Build image - roster
if: steps.changes.outputs.roster == 'true'
working-directory: roster
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps
- name: Build image - tibuild
if: steps.changes.outputs.tibuild == 'true'
working-directory: tibuild
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps
- name: Build image - dl
if: steps.changes.outputs.dl == 'true'
working-directory: dl
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps
- name: Build image - publisher
if: steps.changes.outputs.publisher == 'true'
working-directory: publisher
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps
- name: Build image - chatops-lark
if: steps.changes.outputs.chatops == 'true'
working-directory: chatops-lark
run: |
skaffold build \
--push=false \
--platform ${{ matrix.platform }} \
--default-repo ghcr.io/pingcap-qe/ee-apps