-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (86 loc) · 2.63 KB
/
github-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
name: Test/Build CI
on:
push:
branches:
- main
- release
pull_request:
release:
types: [published]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
lint:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
node-version: [18.x]
project: [app]
defaults:
run:
working-directory: ${{ matrix.project }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/lint
audit:
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
node-version: [18.x]
project: [app, strapi]
defaults:
run:
working-directory: ${{ matrix.project }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: ./.github/workflows/audit
build:
runs-on: ubuntu-latest
needs: [lint, audit]
strategy:
matrix:
project: [app, strapi]
include:
- project: app
image_name: kfwopensource/innoverse-next
- project: strapi
image_name: kfwopensource/innoverse-strapi
defaults:
run:
working-directory: ${{ matrix.project }}
env:
GITHUB_PR_NUMBER: ${{ github.event.number}}
GITHUB_BASE_REF: ${{ github.base_ref}}
GITHUB_HEAD_REF: ${{ github.head_ref}}
PRIVATE_REGISTRY_URL: ${{ secrets.PRIVATE_REGISTRY_URL}}
PRIVATE_REGISTRY_USERNAME: ${{ secrets.PRIVATE_REGISTRY_USERNAME}}
PRIVATE_REGISTRY_PASSWORD: ${{ secrets.PRIVATE_REGISTRY_PASSWORD}}
PRIVATE_PROD_REGISTRY_URL: ${{ secrets.PRIVATE_PROD_REGISTRY_URL}}
PRIVATE_PROD_REGISTRY_USERNAME: ${{ secrets.PRIVATE_PROD_REGISTRY_USERNAME}}
PRIVATE_PROD_REGISTRY_PASSWORD: ${{ secrets.PRIVATE_PROD_REGISTRY_PASSWORD}}
PUBLIC_REGISTRY_USERNAME: ${{ secrets.PUBLIC_REGISTRY_USERNAME}}
PUBLIC_REGISTRY_PASSWORD: ${{ secrets.PUBLIC_REGISTRY_PASSWORD}}
PUBLIC_REGISTRY_URL: docker.io
steps:
- uses: actions/checkout@v4
- uses: docker-practice/actions-setup-docker@master
- uses: ./.github/workflows/build
notification:
runs-on: ubuntu-latest
needs: [lint, audit, build]
env:
GITHUB_BASE_REF: ${{ github.base_ref}}
GITHUB_HEAD_REF: ${{ github.head_ref}}
GITHUB_PR_NUMBER: ${{ github.event.number}}
WEBHOOK_TOKEN: ${{ secrets.WEBHOOK_TOKEN }}
WEBHOOK_REF: ${{ secrets.WEBHOOK_REF }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/notification