-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.47 KB
/
publish_helm_chart_docker.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
name: Publish Helm Chart (Docker)
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Chart Checkout
uses: actions/checkout@v3
- name: Helm Installation
uses: azure/[email protected]
with:
version: v3.11.3
- name: Helm Repository Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
persist-credentials: true
ref: master
- name: Helm Package (Docker)
env:
# experimental feature
HELM_EXPERIMENTAL_OCI: 1
XEBIALABS_DOCKER_HUB_USER: ${{ secrets.XEBIALABS_DOCKER_HUB_USER }}
XEBIALABS_DOCKER_HUB_PASSWORD: ${{ secrets.XEBIALABS_DOCKER_HUB_PASSWORD }}
DH_IMAGE: registry-1.docker.io/xldevdocker/xlr-remote-runner-helm-chart
run: |
CHART_VERSION=$(helm show chart . | grep "^version:" | awk '$1 { print $2 }')
CHART_PACKAGE_NAME="remote-runner-$CHART_VERSION"
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm dependency update
echo ${{ env.XEBIALABS_DOCKER_HUB_USER }}
helm package . --version "$CHART_VERSION" -d build
echo ${{ env.XEBIALABS_DOCKER_HUB_PASSWORD }} | helm registry login ${{ env.DH_IMAGE }} --username ${{ env.XEBIALABS_DOCKER_HUB_USER }} --password-stdin
helm push build/$CHART_PACKAGE_NAME.tgz oci://${{ env.DH_IMAGE }}