forked from platform9/cluster-api-provider-bringyourownhost
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (63 loc) · 1.98 KB
/
Copy pathbuild-controller-manager.yml
File metadata and controls
67 lines (63 loc) · 1.98 KB
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
name: Build Controller Manager
on:
push:
branches: [ main ]
tags: [ 'ci-*' ]
paths-ignore:
- '*.md'
- 'docs/**'
- 'LICENSE'
- 'NOTICE'
- 'PROJECT'
- 'SECURITY_CONTACTS'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '*.md'
- 'docs/**'
- 'LICENSE'
- 'NOTICE'
- 'PROJECT'
- 'SECURITY_CONTACTS'
jobs:
build-controller-manager:
if: ${{ !github.event.pull_request.draft }}
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@v7
with:
go-version: 1.26.2
cache: true
- name: Print tag
run: make tag
- name: Build controller manager image
env:
USE_SYSTEM_GO: "1"
run: bash .ci/build-controller-manager.sh
- name: Save controller manager image artifact
run: |
TAG=$(make tag)
docker save "quay.io/platform9/cluster-api-provider-bringyourownhost/controller-manager:${TAG}" -o controller-manager-image.tar
- name: Upload controller manager image artifact
uses: actions/upload-artifact@v4
with:
name: controller-manager-image
path: controller-manager-image.tar
retention-days: 1
- name: Log in to Quay
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/ci-') }}
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Push controller manager image
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/ci-') }}
run: |
TAG=$(make --no-print-directory tag)
make docker-push IMG="quay.io/platform9/cluster-api-provider-bringyourownhost/controller-manager:${TAG}"