forked from kubeflow/spark-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.41 KB
/
cicd.yaml
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
name: CICD
on:
push:
branches:
- ocean-spark
pull_request:
branches:
- ocean-spark
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-go
- name: Run gofmt check
run: make fmt-check
- name: Run static analysis
run: make static-analysis
- name: Run unit tests
run: make unit-test
cd-dev:
needs: [ci]
runs-on: ubuntu-latest
environment: dev
steps:
- if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v3
- if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: release to dev
uses: ./.github/actions/release
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
public-registry-id: n8e8v3t5
cd-prod:
if: ${{ github.event_name != 'pull_request' }}
needs: [cd-dev]
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- name: release to prod
uses: ./.github/actions/release
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
public-registry-id: f4k1p1n4