-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (42 loc) · 1.41 KB
/
cd-releases-chart.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
name: cd-releases
on:
push:
branches-ignore:
- "**"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/[email protected]
with:
version: v3.8.0
- name: Upload
run: |
mkdir /tmp/package
mkdir /tmp/index
mkdir /tmp/origin
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
echo $VERSION
wget https://rfaircloth-splunk.github.io/splunk-operator-app-deployer/index.yaml -P /tmp/origin
helm package charts/splunk-operator-app-deployer -d /tmp/package
gh release upload $VERSION /tmp/package/*
helm repo index /tmp/package --url https://github.com/rfaircloth-splunk/splunk-operator-app-deployer/releases/download/$VERSION --merge /tmp/origin/index.yaml
cp /tmp/package/index.yaml /tmp/index/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /tmp/index
keep_files: true