Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/push-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: push-chart

on:
push:
branches:
- '**'
tags:
- v*

Expand All @@ -23,6 +25,7 @@ jobs:
uses: azure/setup-helm@v4.3.1

- name: Log in to the Container registry
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -32,17 +35,28 @@ jobs:
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Chart version: $VERSION"

- name: Update Chart.yaml with version
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Chart version: $VERSION"
else
echo "Not a tag push, skipping version extraction"
echo "version=0.0.0-dev" >> $GITHUB_OUTPUT
fi

- name: Set chart version
run: |
sed -i "s/^version:.*/version: ${{ steps.get_version.outputs.version }}/" ./chart/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: \"${{ steps.get_version.outputs.version }}\"/" ./chart/Chart.yaml
cat ./chart/Chart.yaml
helm template --debug ./chart

- name: Lint
run: |
helm lint chart

- name: Publish Helm chart to GHCR
- name: Publish chart to registry
if: startsWith(github.ref, 'refs/tags/v')
run: |
helm package chart
helm push domaineer-${{ steps.get_version.outputs.version }}.tgz oci://${{ env.REGISTRY }}/gldraphael/charts
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: push-image

on:
push:
branches:
- '**'
tags:
- v*

Expand All @@ -23,6 +25,7 @@ jobs:
uses: actions/checkout@v5

- name: Log in to the Container registry
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -40,6 +43,6 @@ jobs:
with:
context: ${{ env.CONTEXT }}
file: ${{ env.DOCKERFILE }}
push: true
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading