Skip to content

test4

test4 #8

name: Publish Helm Chart
on:
push:
branches:
- publish_helm
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: 'latest'
- name: Package Helm Chart
working-directory: open-dora-helm-chart
run: |
helm package .
mv *.tgz $GITHUB_WORKSPACE
- name: Publish to GitHub Packages
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
HELM_CHART_TGZ=$(basename $GITHUB_WORKSPACE/open-dora-helm-chart-*.tgz)
REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
DOCKER_IMAGE_NAME=ghcr.io/$REPO_NAME/open-dora-helm-chart
docker tag $DOCKER_IMAGE_NAME:$HELM_CHART_TGZ $DOCKER_IMAGE_NAME:latest
docker push $DOCKER_IMAGE_NAME:latest