-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (74 loc) · 2.2 KB
/
test-and-release.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
name: Run Operator SDK tests, release new operator images if tests succeed
on:
schedule:
- cron: '0 1 * * *' # everyday at 1am
push:
branches:
- develop
- main
pull_request:
branches:
- develop
jobs:
test-cluster:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Kind
uses: engineerd/[email protected]
with:
config: molecule/kind/files/kind-config.yml
name: osdk-test-cluster
version: v0.10.0
- name: Prereq setup
run: hack/ci-setup.sh
- name: Test
run: hack/ci-test.sh kind-cluster
test-namespace:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Kind
uses: engineerd/[email protected]
with:
config: molecule/kind/files/kind-config.yml
name: osdk-test-namespace
version: v0.10.0
- name: Prereq setup
run: hack/ci-setup.sh
- name: Test
run: hack/ci-test.sh kind-namespace
release:
needs: [test-cluster, test-namespace]
if: >
github.event_name != 'pull_request' &&
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Login to Quay
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build, bundle, and push (develop)
run: |
pip3 install --user --upgrade setuptools wheel pip
hack/operate.sh --push-images --bundle --develop --verbose --formatter
if: github.ref == 'refs/heads/develop'
- name: Build, bundle, and push
run: |
pip3 install --user --upgrade setuptools wheel pip
hack/operate.sh --push-images --bundle --extra-tag=latest --verbose --formatter
if: github.ref == 'refs/heads/main'