-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (58 loc) · 1.73 KB
/
operator.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
name: Build and publish services
on:
push:
tags:
- "v*.*.*"
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
helm:
runs-on: ubuntu-latest
steps:
- name: Push Helm chart to OCI compatible registry (DockerHub)
uses: bsord/[email protected]
with:
useOCIRegistry: true
registry-url: oci://registry-1.docker.io/cbartifactory
username: ${{ secrets.DOCKERHUB_USER }}
access-token: ${{ secrets.DOCKERHUB_PASSWORD }}
force: true
build:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
images: |
octarine-operator
flavor: |
latest=false
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- name: Setup Operator SDK
run: |
mkdir /tmp/operator-sdk
git clone -b v1.32.0 https://github.com/operator-framework/operator-sdk /tmp/operator-sdk
cd /tmp/operator-sdk
make install
cd -
- run: make generate
- run: make manifests
- run: make test
- name: Build and push
run: make docker-build docker-push IMG=cbartifactory/${{ steps.meta.outputs.tags }} VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}