نسخ من khaledmahfouz5/Maqtaa
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 4.3.1 to 5.0.0. - [Release notes](https://github.com/azure/setup-helm/releases) - [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md) - [Commits](https://github.com/azure/setup-helm/compare/v4.3.1...v5.0.0) --- updated-dependencies: - dependency-name: azure/setup-helm dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
50 أسطر
1.5 KiB
YAML
50 أسطر
1.5 KiB
YAML
name: Build / Deploy Helm Chart
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@v5.0.0
|
|
with:
|
|
version: 'latest'
|
|
|
|
- name: Update Helm chart dependencies
|
|
run: |
|
|
cd ./helm/opengist
|
|
helm dependency update
|
|
|
|
- name: Package Helm chart
|
|
run: |
|
|
cd ./helm
|
|
helm package ./opengist
|
|
|
|
# First time, create the index
|
|
wget -q https://helm.opengist.io/index.yaml
|
|
if [ ! -f index.yaml ]; then
|
|
helm repo index --url https://helm.opengist.io .
|
|
else
|
|
# For subsequent runs, merge with existing index
|
|
helm repo index --url https://helm.opengist.io --merge index.yaml .
|
|
fi
|
|
|
|
- name: Push to docs repository
|
|
run: |
|
|
git clone https://${{ secrets.STATIC_REPO_TOKEN }}@github.com/${{ secrets.STATIC_REPO }}.git target-repo
|
|
mkdir -p target-repo/helm
|
|
cp helm/*.tgz target-repo/srv/helm/
|
|
cp helm/index.yaml target-repo/srv/helm/
|
|
cd target-repo
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add .
|
|
git commit -m "Deploy helm chart from ${{ github.repository }}@${{ github.sha }}" || echo "No changes to commit"
|
|
git pull --rebase
|
|
git push
|