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 }}
0 commit comments