Add GitHub Actions workflow for packaging Helm chart on release
This commit is contained in:
parent
5386a03c0c
commit
7646408648
34
.gitea/workflows/package-and-deploy.yaml
Normal file
34
.gitea/workflows/package-and-deploy.yaml
Normal file
@ -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 }}
|
Loading…
x
Reference in New Issue
Block a user