-
Notifications
You must be signed in to change notification settings - Fork 18
89 lines (71 loc) · 2.68 KB
/
post-submit.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
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
name: Publish Container Images
on:
push:
branches:
- main
tags:
- 'v*'
permissions:
contents: write
pull-requests: read
jobs:
push_to_registry:
name: Build and push images to quay.io/medik8s
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Log in to Quay.io
uses: docker/login-action@v2
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Build and push CSV 0.0.1 + latest images, for pushes
if: ${{ github.ref_type != 'tag' }}
run: make container-build-k8s container-push
- name: Build and push versioned CSV and images, for tags
if: ${{ github.ref_type == 'tag' }}
# remove leading 'v' from tag!
run: export VERSION=$(echo $GITHUB_REF_NAME | sed 's/v//') && make container-build-k8s container-push
- name: Create release with manifests
if: ${{ github.ref_type == 'tag' }}
# https://github.com/marketplace/actions/github-release-create-update-and-upload-assets
uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
body: |
# Node HealthCheck Operator ${{ github.ref_name }}
## Notable Changes
* TODO
## Release Artifacts
### Images
* Operator: quay.io/medik8s/node-healthcheck-operator:${{ github.ref_name }}
* Bundle: quay.io/medik8s/node-healthcheck-operator-bundle:${{ github.ref_name }}
* Catalog aka Index: quay.io/medik8s/node-healthcheck-operator-index:${{ github.ref_name }}
### Source code and OLM manifests
Please find the source code and the OLM manifests in the `Assets` section below.
gzip: folders
files: >
Manifests:bundle/
- name: Build and push index image with versioned NHC + SNR images
if: ${{ github.ref_type != 'tag' }}
run: |
# get script from github
NAME=build-nhc-snr.sh
curl https://raw.githubusercontent.com/medik8s/tools/main/scripts/${NAME} -o ${NAME}
chmod +x $NAME
# set version vars
VERSION=9.9.9-ci
export NHC_VERSION=${VERSION}
export SNR_VERSION=${VERSION}
export INDEX_VERSION=${VERSION}
# build and push images
./$NAME --skip-deploy