mirror of
https://github.com/lukaszraczylo/jobs-manager-operator.git
synced 2026-06-06 22:39:22 +00:00
Update release.
This commit is contained in:
@@ -28,7 +28,7 @@ jobs:
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout operator repo
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@@ -40,43 +40,13 @@ jobs:
|
||||
VERSION=${VERSION#v}
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
version: v3.14.0
|
||||
|
||||
- name: Checkout helm-charts repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: lukaszraczylo/helm-charts
|
||||
ref: gh-pages
|
||||
path: helm-charts
|
||||
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
|
||||
- name: Update and package Helm chart
|
||||
- name: Trigger helm-charts release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
|
||||
# Update chart version
|
||||
sed -i "s/^version:.*/version: $VERSION/" charts/jobs-manager-operator/Chart.yaml
|
||||
sed -i "s/^appVersion:.*/appVersion: \"$VERSION\"/" charts/jobs-manager-operator/Chart.yaml
|
||||
sed -i "s/tag:.*/tag: \"$VERSION\"/" charts/jobs-manager-operator/values.yaml
|
||||
|
||||
# Copy updated chart to helm-charts repo
|
||||
cp -R charts/jobs-manager-operator/* helm-charts/charts/jobs-manager-operator/
|
||||
|
||||
# Package chart
|
||||
helm package charts/jobs-manager-operator -d helm-charts/charts/packages/
|
||||
|
||||
# Update index
|
||||
cd helm-charts
|
||||
helm repo index . --url https://lukaszraczylo.github.io/helm-charts/ --merge index.yaml
|
||||
|
||||
- name: Commit and push to helm-charts
|
||||
run: |
|
||||
cd helm-charts
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add -A
|
||||
git diff --staged --quiet || git commit -m "Release jobs-manager ${{ steps.version.outputs.version }}"
|
||||
git push
|
||||
gh api repos/lukaszraczylo/helm-charts/dispatches \
|
||||
-f event_type=release-chart \
|
||||
-f client_payload[chart_name]=jobs-manager \
|
||||
-f client_payload[version]=${{ steps.version.outputs.version }} \
|
||||
-f client_payload[source_repo]=lukaszraczylo/jobs-manager-operator \
|
||||
-f client_payload[chart_path]=charts/jobs-manager-operator
|
||||
|
||||
Reference in New Issue
Block a user