-
Notifications
You must be signed in to change notification settings - Fork 12
57 lines (50 loc) · 1.65 KB
/
release.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
name: Release
on:
release:
types: [prereleased, released]
jobs:
release_asset:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Package Helm Chart
uses: WyriHaximus/github-action-helm3@v2
with:
exec: helm package K8s/charts/otel-shop
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} otel-shop-${{ github.event.release.tag_name }}.tgz
- uses: actions/upload-artifact@v3
with:
name: chart-archive
path: otel-shop-${{ github.event.release.tag_name }}.tgz
release_chart:
needs: release_asset
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- uses: actions/download-artifact@v3
with:
name: chart-archive
- name: Package Helm Chart
uses: WyriHaximus/github-action-helm3@v2
with:
exec: helm repo index . --merge index.yaml --url https://github.com/instana/otel-shop/releases/download/${{ github.event.release.tag_name }}/
- run: rm *.tgz
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
message: "Update helm repo for version ${{ github.event.release.tag_name }}"