2023-06-25 15:08:31 +00:00
|
|
|
name: generate-chart
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
generate-chart-publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-08-10 10:06:00 +00:00
|
|
|
- uses: https://gitea.com/actions/checkout@v4
|
2023-06-25 15:08:31 +00:00
|
|
|
- name: install tools
|
|
|
|
run: |
|
|
|
|
apt update -y
|
2023-06-26 15:47:44 +00:00
|
|
|
apt install -y curl lftp
|
2023-06-25 15:08:31 +00:00
|
|
|
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null
|
|
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list
|
|
|
|
apt update -y
|
|
|
|
apt install -y python helm python3-pip apt-transport-https
|
|
|
|
|
|
|
|
# - name: Import GPG key
|
|
|
|
# id: import_gpg
|
|
|
|
# uses: https://github.com/crazy-max/ghaction-import-gpg@v5
|
|
|
|
# with:
|
|
|
|
# gpg_private_key: ${{ secrets.GPGSIGN_KEY }}
|
|
|
|
# passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
|
|
|
|
# fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0
|
|
|
|
|
|
|
|
# Using helm gpg plugin as 'helm package --sign' has issues with gpg2: https://github.com/helm/helm/issues/2843
|
|
|
|
- name: package charts
|
|
|
|
run: |
|
|
|
|
# FIXME: use upstream after https://github.com/technosophos/helm-gpg/issues/1 is solved
|
|
|
|
helm plugin install https://github.com/pat-s/helm-gpg
|
2023-06-26 11:07:51 +00:00
|
|
|
helm plugin install https://github.com/chartmuseum/helm-push
|
2023-06-25 15:08:31 +00:00
|
|
|
make all
|
|
|
|
|
2023-06-26 11:07:51 +00:00
|
|
|
- name: Deploy to Gitea helm
|
|
|
|
run: |
|
|
|
|
helm repo add --username ${{ secrets.repo_user }} --password ${{ secrets.repo_password }} cooopsspace https://git.coo-ops.space/api/packages/coo-ops.space/helm
|
|
|
|
for filename in ./_build/*.tgz; do
|
|
|
|
helm cm-push $filename cooopsspace
|
|
|
|
done
|
2023-06-26 15:47:44 +00:00
|
|
|
|
2023-06-25 15:08:31 +00:00
|
|
|
- name: Deploy to FTP Server
|
2023-06-26 15:47:44 +00:00
|
|
|
run: |
|
|
|
|
lftp ${{ secrets.ftp_host }} -u ${{ secrets.ftp_user }},${{ secrets.ftp_password }} -e "set ftp:ssl-protect-data true; set ftp:ssl-force true; set ssl:verify-certificate true; mirror --overwrite --reverse --continue --dereference -x ^\.git/$ ./_build/ ./; quit"
|