Skip to content

Merge pull request #2 from wunderio/feature/argocd-chart-improvements #8

Merge pull request #2 from wunderio/feature/argocd-chart-improvements

Merge pull request #2 from wunderio/feature/argocd-chart-improvements #8

Workflow file for this run

---
name: Publish Helm charts to OCI registry
on:
push:
branches: [master]
paths:
- "drupal/**"
- "frontend/**"
- "simple/**"
- "elasticsearch/**"
- "silta-release/**"
workflow_dispatch:
env:
REGISTRY: registry.wdr.io
REGISTRY_PATH: registry.wdr.io/charts
jobs:
publish:
name: Package & Push — ${{ matrix.chart }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chart: [drupal, frontend, simple]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.16.4
- name: Add dependency repos
run: |
helm repo add wunderio https://storage.googleapis.com/charts.wdr.io
helm repo add jouve https://jouve.github.io/charts/
helm repo add percona https://percona.github.io/percona-helm-charts/
helm repo update
- name: Build chart dependencies
run: helm dependency build ./${{ matrix.chart }}
- name: Lint chart
run: helm lint ./${{ matrix.chart }}
- name: Package chart
id: package
run: |
helm package ./${{ matrix.chart }} --destination /tmp/charts
PKG=$(ls /tmp/charts/${{ matrix.chart }}-*.tgz)
echo "package=${PKG}" >> "$GITHUB_OUTPUT"
- name: Log in to Harbor
run: |
helm registry login '${{ env.REGISTRY }}' \
--username '${{ secrets.REGISTRY_USERNAME }}' \
--password '${{ secrets.REGISTRY_PASSWORD }}'
- name: Push chart to Harbor
run: |
helm push "${{ steps.package.outputs.package }}" \
"oci://${{ env.REGISTRY_PATH }}"