-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (67 loc) · 2.02 KB
/
build-push.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
name: build-push
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
cache: gradle
- id: repository
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository }}/cmcc-operator
- name: push
uses: gradle/actions/setup-gradle@v3
with:
arguments: >
build test jib
-Djib.to.image=ghcr.io/${{ steps.repository.outputs.lowercase }}:${{github.ref_name}}
-Djib.to.tags=${{github.ref_name}},latest
-Djib.to.auth.username=${{ github.actor }}
-Djib.to.auth.password=${{ github.token }}
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: update Chart.yaml
working-directory: charts
run: |
cat <<EOF >cmcc/Chart.yaml
apiVersion: v2
name: cmcc
description: CoreMedia Content Cloud through cmcc-operator
type: application
version: ${{github.ref_name}}
appVersion: ${{github.ref_name}}
EOF
cat <<EOF >cmcc-operator/Chart.yaml
apiVersion: v2
name: cmcc-operator
description: Kubernetes Operator to bring up a CoreMedia Content Cloud installation
type: application
version: ${{github.ref_name}}
appVersion: ${{github.ref_name}}
EOF
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.8.1
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"