76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
name: Update Helm Dependencies
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
helmRepo:
|
|
description: 'Helm Repository'
|
|
required: true
|
|
default: 'forgejo'
|
|
type: choice
|
|
options:
|
|
- argocd
|
|
- forgejo
|
|
- nginx
|
|
tag:
|
|
description: 'Tag (e.g. v11.0.5)'
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: docker
|
|
steps:
|
|
|
|
- name: Checkout helm repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: DevFW-CICD/${{ inputs.helmRepo }}-helm
|
|
token: ${{ secrets.PAT }}
|
|
ref: main
|
|
path: helmworkspace
|
|
|
|
- name: Update repo
|
|
run: |
|
|
cd helmworkspace
|
|
echo repo: ${{ inputs.helmRepo }}
|
|
echo tag: ${{ inputs.tag }}
|
|
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
git remote add upstream https://code.forgejo.org/forgejo-helm/forgejo-helm.git
|
|
git fetch --all
|
|
git checkout upstream/main
|
|
git checkout main
|
|
git merge upstream/main || true
|
|
git commit || true
|
|
|
|
echo hier
|
|
|
|
git push origin ${{ inputs.tag }}
|
|
|
|
git checkout ${{ inputs.tag }}
|
|
rm .gitignore
|
|
|
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
|
wget https://get.helm.sh/helm-v3.16.2-linux-amd64.tar.gz
|
|
tar xf helm-v3.16.2-linux-amd64.tar.gz
|
|
mv linux-amd64/helm ../helm
|
|
rm -Rf linux-amd64 helm-v3.16.2-linux-amd64.tar.gz
|
|
else
|
|
wget https://get.helm.sh/helm-v3.16.2-linux-arm64.tar.gz
|
|
tar xf helm-v3.16.2-linux-arm64.tar.gz
|
|
mv linux-arm64/helm ../helm
|
|
rm -Rf linux-arm64 helm-v3.16.2-linux-arm64.tar.gz
|
|
fi
|
|
../helm dependency update .
|
|
../helm dependency build .
|
|
git status
|
|
git add -A
|
|
git commit -m "Added helm dependencies"
|
|
git tag ${{ inputs.tag }}-depends
|
|
git push origin ${{ inputs.tag }}-depends
|
|
|
|
|
|
|