Skip to content

Commit

Permalink
Publish chart
Browse files Browse the repository at this point in the history
  • Loading branch information
hanazuki committed Apr 16, 2024
1 parent 4bca355 commit c6e968c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'Publish helm chart'
on:
push:
branches:
- 'main'
paths:
- 'deploy/**'
- '.github/workflows/chart.yaml'

jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

-
name: Install Helm
uses: azure/setup-helm@v4
with:
version: 3.*

- name: Replace version
run: |
sed -i "/^version:/ s/$/-$(date +%Y%m%d%H%M%S)/" deploy/*/Chart.yaml
-
name: Package charts
run: |
for chart in deploy/*; do
if [ -e "$chart/Chart.yaml" ]; then
helm package "$chart"
fi
done
-
name: Login to GHCR
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push charts
run: |
for pkg in *.tgz; do
helm push "$pkg" oci://ghcr.io/kmc-jp/cert-manager-webhook-pdns
done

0 comments on commit c6e968c

Please sign in to comment.