Skip to content

Commit 97efe83

Browse files
committed
add GH action for unstable
1 parent d6518fe commit 97efe83

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: fake-services-release-unstable
2+
3+
env:
4+
APP_DIR: applications/fake-services
5+
APP_SLUG: gerard-helm-fake-service
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- '*gerard*'
12+
paths:
13+
- 'applications/fake-services/**'
14+
15+
jobs:
16+
push-to-replicated:
17+
runs-on: ubuntu-22.04
18+
19+
defaults:
20+
run:
21+
working-directory: ${{ env.APP_DIR }}
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set release version
29+
id: set-release-version
30+
run: |
31+
git_hash=$(git rev-parse --short HEAD)
32+
date_version=$(date -u '+%Y.%-m.%-d-%H%M%S')
33+
version="${date_version}-Unstable-${git_hash}"
34+
echo "VERSION=${version}" >> $GITHUB_ENV
35+
36+
- name: Package Helm chart
37+
id: package-helm-chart
38+
run: |
39+
helm package ./app --debug -u -d ./replicated \
40+
--version ${{ env.VERSION }} \
41+
--app-version ${{ env.VERSION }}
42+
43+
- name: Install yq
44+
run: |
45+
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq &&\
46+
chmod +x /usr/local/bin/yq
47+
48+
- name: Update HelmChart kind
49+
run: |
50+
yq -i '.spec.chart.chartVersion = "${{ env.VERSION }}"' ./replicated/kots-chart.yaml
51+
52+
- name: Create Replicated release
53+
id: create-release
54+
uses: replicatedhq/compatibility-actions/create-release@v1
55+
with:
56+
app-slug: ${{ env.APP_SLUG }}
57+
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
58+
yaml-dir: ./replicated
59+
promote-channel: Unstable
60+
version: ${{ env.VERSION }}
61+
62+
outputs:
63+
channel-slug: ${{ steps.create-release.outputs.channel-slug }}
64+
release-sequence: ${{ steps.create-release.outputs.release-sequence }}
65+
app-version: ${{ env.VERSION }}

applications/fake-services/replicated/kots-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
title: Message
2929
type: text
3030
required: true
31-
default: Today is Christmas Eve! Ho Ho Ho! DO NOT USE CUSTOM DOMAIN YET!
31+
default: Test Github Action in platform-examples
3232
- name: frontend_log_level
3333
title: Log level
3434
type: radio

0 commit comments

Comments
 (0)