forked from apache/spark-kubernetes-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.89 KB
/
publish_snapshot_chart.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
name: Publish Snapshot Chart
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
branch:
description: 'list of branches to publish (JSON)'
required: true
# keep in sync with default value of strategy matrix 'branch'
default: '["main"]'
jobs:
publish-snapshot-chart:
if: ${{ startsWith(github.repository, 'apache/') }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# keep in sync with default value of workflow_dispatch input 'branch'
branch: ${{ fromJSON( inputs.branch || '["main"]' ) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'adopt'
cache: 'gradle'
- name: Build Operator
run: |
./gradlew build spark-operator-api:relocateGeneratedCRD -x check --no-daemon
- name: Build Chart
run: |
cd build-tools/helm
sed -i 's/repository: /repository: apache\//' spark-kubernetes-operator/values.yaml
sed -i 's/tag: .*$/tag: main-snapshot/' spark-kubernetes-operator/values.yaml
mkdir -p tmp/charts
helm package spark-kubernetes-operator -d tmp/charts --app-version main-snapshot
helm repo index tmp/charts --url https://nightlies.apache.org/spark/charts
helm show chart tmp/charts/spark-kubernetes-operator-*.tgz
- name: Upload
uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr
path: build-tools/helm/tmp/*
remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/spark
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}