mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 01:01:40 +03:00
29fc4d141f
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [azure/setup-helm](https://togithub.com/azure/setup-helm) | action | major | `v3` -> `v4` | --- ### Release Notes <details> <summary>azure/setup-helm (azure/setup-helm)</summary> ### [`v4`](https://togithub.com/Azure/setup-helm/releases/tag/v4) [Compare Source](https://togithub.com/azure/setup-helm/compare/v3...v4) Latest v4 release </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMTIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMi4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
name: Release Charts
|
|
|
|
on:
|
|
push:
|
|
branches: [canary]
|
|
paths:
|
|
- '.github/helm/**/Chart.yml'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Checkout Helm chart repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: toeverything/helm-charts
|
|
path: .helm-chart-repo
|
|
ref: gh-pages
|
|
token: ${{ secrets.HELM_RELEASER_TOKEN }}
|
|
|
|
- name: Install Helm
|
|
uses: azure/setup-helm@v4
|
|
|
|
- name: Install chart releaser
|
|
run: |
|
|
set -e
|
|
arch="$(dpkg --print-architecture)"
|
|
curl -s https://api.github.com/repos/helm/chart-releaser/releases/latest \
|
|
| yq --indent 0 --no-colors --input-format json --unwrapScalar \
|
|
".assets[] | select(.name | test("\""^chart-releaser_.+_linux_${arch}\.tar\.gz$"\"")) | .browser_download_url" \
|
|
| xargs curl -SsL \
|
|
| tar zxf - -C /usr/local/bin
|
|
|
|
- name: Package charts
|
|
working-directory: .helm-chart-repo
|
|
run: |
|
|
mkdir -p .cr-index
|
|
helm repo add bitnami https://charts.bitnami.com/bitnami
|
|
helm repo update
|
|
|
|
helm dependencies build ../.github/helm/affine
|
|
helm dependencies build ../.github/helm/affine-cloud
|
|
cr package ../.github/helm/affine
|
|
cr package ../.github/helm/affine-cloud
|
|
|
|
- name: Publish charts
|
|
working-directory: .helm-chart-repo
|
|
run: |
|
|
set -ex
|
|
git config --local user.name "$GITHUB_ACTOR"
|
|
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
owner=$(cut -d '/' -f 1 <<< '${{ github.repository }}')
|
|
repo=helm-charts
|
|
git_hash=$(git rev-parse HEAD)
|
|
cr upload --commit "$git_hash" \
|
|
--git-repo "$repo" --owner "$owner" \
|
|
--token '${{ secrets.HELM_RELEASER_TOKEN }}' \
|
|
--skip-existing
|
|
cr index --git-repo "$repo" --owner "$owner" \
|
|
--token '${{ secrets.HELM_RELEASER_TOKEN }}' \
|
|
--index-path .cr-index --push
|