-
Notifications
You must be signed in to change notification settings - Fork 111
70 lines (66 loc) · 2.07 KB
/
cd-pages.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
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: cd-pages-helm
on:
push:
branches-ignore:
- "**"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: write
actions: read
pages: write
packages: write
deployments: write
jobs:
mike:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oleksiyrudenko/gha-git-credentials@v2.1.1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/setup-python@v4
with:
python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Upload
run: |
VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/v//')
echo $VERSION
pip3 install poetry
poetry install
poetry run mike deploy -p $VERSION
helm:
runs-on: ubuntu-latest
needs: mike
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.11.2
- 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://splunk.github.io/splunk-connect-for-syslog/index.yaml -P /tmp/origin
helm package charts/splunk-connect-for-syslog -d /tmp/package
gh release upload $VERSION /tmp/package/*
helm repo index /tmp/package --url https://github.com/splunk/splunk-connect-for-syslog/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