-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (65 loc) · 2.23 KB
/
pr-build.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
name: build and validate
on:
schedule:
- cron: 30 2 * * 1
push:
branches:
- main
pull_request:
jobs:
validate-helm-charts:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: validate kafka-topic-creator chart
uses: hypertrace/github-actions/validate-charts@main
with:
chart-path: ./kafka-topic-creator/helm/
- name: validate kstreams-app-version-checker chart
uses: hypertrace/github-actions/validate-charts@main
with:
chart-path: ./kstreams-app-version-checker/helm/
build:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
with:
username: ${{ secrets.DOCKERHUB_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build kafka-topic-creator image
uses: docker/build-push-action@v3
with:
tags: hypertrace/kafka-topic-creator:test
context: kafka-topic-creator
cache-from: type=gha,scope=kafka-topic-creator
load: true
- name: Build kstreams-app-version-checker image
uses: docker/build-push-action@v3
with:
tags: hypertrace/kstreams-app-version-checker:test
context: kstreams-app-version-checker
cache-from: type=gha,scope=kstreams-app-version-checker
load: true
- name: Scan kafka-topic-creator image
uses: hypertrace/github-actions/trivy-image-scan@main
with:
image: hypertrace/kafka-topic-creator
tag: test
output-mode: github
category: kafka-topic-creator
- name: Scan kstreams-app-version-checker image
uses: hypertrace/github-actions/trivy-image-scan@main
with:
image: hypertrace/kstreams-app-version-checker
tag: test
output-mode: github
category: kstreams-app-version-checker