forked from sentry-kubernetes/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
55 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,67 +2,30 @@ name: Build and push Chart | |
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- 'stable' | ||
|
||
env: | ||
VERSION: 1.2.3 | ||
|
||
jobs: | ||
build-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
path: 'main' | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
path: 'gh-pages' | ||
|
||
- run: | | ||
cd gh-pages | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | ||
git checkout gh-pages | ||
- name: Build clickhouse chart | ||
uses: WyriHaximus/github-action-helm3@v4 | ||
with: | ||
exec: helm package -u main/charts/clickhouse --destination gh-pages/charts | ||
- uses: azure/[email protected] | ||
|
||
- name: Build sentry chart | ||
uses: WyriHaximus/github-action-helm3@v4 | ||
with: | ||
exec: helm package -u main/charts/sentry --destination gh-pages/charts | ||
- name: Build Clickhouse chart | ||
run: helm package charts/clickhouse --version ${{ env.VERSION }} | ||
- name: Build Sentry-Kubernetes chart | ||
run: helm package charts/sentry-kubernetes --version ${{ env.VERSION }} | ||
- name: Build Sentry chart | ||
run: helm package charts/sentry -u --version ${{ env.VERSION }} | ||
|
||
- name: Build sentry-kubernetes chart | ||
uses: WyriHaximus/github-action-helm3@v4 | ||
with: | ||
exec: helm package -u main/charts/sentry-kubernetes --destination gh-pages/charts | ||
|
||
- name: Build sentry-kubernetes chart | ||
uses: WyriHaximus/github-action-helm3@v4 | ||
with: | ||
exec: helm repo index --url https://sentry-kubernetes.github.io/charts ./gh-pages/charts | ||
|
||
- name: Commit files | ||
run: | | ||
cd gh-pages | ||
git add . | ||
git commit -m "Add changes" -a | ||
- name: Push changes | ||
uses: ad-m/github-push-action@9870d48124da805820c70ebc6ba563c715551019 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
directory: gh-pages | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v2 | ||
- name: Login into registry | ||
env: | ||
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} | ||
PUBLISH_BRANCH: gh-pages | ||
PUBLISH_DIR: ./gh-pages/charts | ||
with: | ||
keepFiles: true | ||
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
run: helm registry login ghcr.io -u ${{ github.actor }} -p "$REGISTRY_PASSWORD" | ||
|
||
- name: Push Sentry chart | ||
run: helm push sentry-${{ env.VERSION }}.tgz oci://ghcr.io/kpn |