-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (52 loc) · 1.69 KB
/
main.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
name: Main
on:
push:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.jpeg"
- "**.png"
- "index.html"
permissions:
contents: read
checks: write
pages: write
id-token: write
jobs:
golang_quality:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
golang_test:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
needs: [build_openapi_spec] # Validates agains OpenAPI spec
with:
services: '{"database": {"image": "mysql:9.0", "ports": ["3306:3306"], "env": {"MYSQL_ROOT_PASSWORD": "mypass", "MYSQL_DATABASE": "remindme"}}}'
env: '{"TEST_DB_HOST": "database"}'
build_openapi_spec:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
with:
entrypoint: cmd/remindme/main.go
render_openapi_spec:
needs: [build_openapi_spec]
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
with:
spec_artifact_name: openapi-spec
spec_artifact_path: docs/
spec_filename: swagger.yaml
deploy_openapi_spec:
needs: [render_openapi_spec]
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
with:
artifact_name: rendered-api-docu
artifact_path: index.html
build_image:
needs: [golang_test, golang_quality, render_openapi_spec]
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
with:
docker_build_args: "--no-cache"
docker_file_path: "./"
image_name: "cubicrootxyz/remindme"
static_tag: "beta"
vuln_scan: true
secrets:
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}