From 7646408648414013c11309d2983e12499034c28e Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Thu, 8 May 2025 00:06:17 +0200 Subject: [PATCH] Add GitHub Actions workflow for packaging Helm chart on release --- .gitea/workflows/package-and-deploy.yaml | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/package-and-deploy.yaml diff --git a/.gitea/workflows/package-and-deploy.yaml b/.gitea/workflows/package-and-deploy.yaml new file mode 100644 index 0000000..d05b608 --- /dev/null +++ b/.gitea/workflows/package-and-deploy.yaml @@ -0,0 +1,34 @@ +name: Packaging Chart + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup latest Helm + uses: azure/setup-helm@v4.3.0 + with: + version: latest + id: install + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + trust_level: 5 + - name: Export GPG key in legacy format + run: | + gpg --export-secret-keys --output /tmp/keyring.gpg ${{ secrets.GPG_KEY_ID }} + - name: Package Chart + run: | + helm dependency build ./charts/bookstack + helm package --version $CHART_VERSION --sign --keyring /tmp/keyring.gpg ./bookstack --dependency-update + curl -u $REPO_CREDENTIALS -F "chart=@bookstack-$CHART_VERSION.tgz" -F "prov=@bookstack-$CHART_VERSION.tgz.prov" https://charts.morlana.net/api/charts + env: + REPO_CREDENTIALS: ${{ secrets.REPO_CREDENTIALS }} + CHART_VERSION: ${{ github.event.release.tag_name }}