-
Notifications
You must be signed in to change notification settings - Fork 37
70 lines (59 loc) · 1.89 KB
/
operator-metadata.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
name: Operator Metadata Sanity
on:
push:
branches:
- main
- "maint-*"
paths-ignore:
- 'docs/**'
pull_request:
branches:
- main
- "maint-*"
paths-ignore:
- 'docs/**'
env:
IMAGE: quay.io/crowdstrike/falcon-operator
TAG: latest
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.21.x]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
- name: Set release version
if: github.ref_name != 'main' && github.base_ref != 'main'
run: |
TAG=$(grep ^VERSION Makefile | awk '{print $NF}')
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Setup the Operator SDK toolkit
run: |
make kustomize operator-sdk
IMAGE_TAG=${{ env.IMAGE }}:${{ env.TAG }}
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
- name: Ensure autogenerated stuff is in the best possible shape
run: |
make manifests generate IMG=${{ env.IMAGE_TAG }}
make non-olm
if [[ -n $(git status -s) ]] ; then
echo
echo -e "\e[31mGenerating manifests leaves tracked fields in a modified state."
echo -e "\e[31mEnsure to include updated manifests in this PR."
echo -e "\e[31mThis is usually done by running 'make manifests generate non-olm' and running 'git add ...' for the files that was modified by generating manifests.\e[0m"
git status -s
git diff --color
exit 1
fi