Update README with deployment instructions #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Helm CI | |
on: | |
push: | |
pull_request: | |
env: | |
GCR_IMAGE: ghcr.io/diamondlightsource/logpanel | |
HELM_VERSION: 3.12.3 | |
HELM_CHART: helm/logpanel | |
jobs: | |
check: | |
name: check helm chart | |
runs-on: ubuntu-latest | |
# environment: prod | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: install helm | |
uses: Azure/setup-helm@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
id: install | |
- name: check chart | |
run: helm lint ${{ env.HELM_CHART }} | |
- name: check depdencies | |
run: helm dependencies build ${{ env.HELM_CHART }} | |
build: | |
if: github.ref_type == 'tag' | |
name: publish gcr | |
runs-on: ubuntu-latest | |
# environment: prod | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v3 | |
- name: install helm | |
uses: Azure/setup-helm@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
id: install | |
- name: login to acr using helm | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.GCR_IMAGE }} --username ${{ github.repository_owner }} --password-stdin | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=tag | |
- name: package chart and push it | |
run: | | |
sed -i "$ a appVersion: ${GITHUB_REF##*/}" ${{ env.HELM_CHART }}/Chart.yaml | |
helm dependencies build ${{ env.HELM_CHART }} | |
helm package ${{ env.HELM_CHART }} --version ${GITHUB_REF##*/} -d /tmp/ | |
helm push /tmp/logpanel-${GITHUB_REF##*/}.tgz oci://ghcr.io/diamondlightsource/charts |