0
Fork 0
mirror of https://github.com/penpot/penpot-helm.git synced 2024-12-22 05:32:59 -05:00

chore: github action 'publish'

This commit is contained in:
David Barragán Merino 2024-07-12 17:02:15 +02:00 committed by David Barragán Merino
parent 8c1f30e052
commit 7a3b1534c1
4 changed files with 106 additions and 2 deletions

12
.github/configs/cr.yaml vendored Normal file
View file

@ -0,0 +1,12 @@
---
# cr.yaml
## Reference: https://github.com/helm/chart-releaser
index-path: "./index.yaml"
# Set to true for GPG signing
sign: true
# UID of the GPG key to use
key: Kaleidos INC <infra@kaleidos.net>
# Enable automatic generation of release notes using GitHubs release notes
# generator. See:
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
generate-release-notes: true

88
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,88 @@
name: Release Charts
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
#push:
# branches:
# - main
# paths:
# - "charts/**"
jobs:
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write # for helm/chart-releaser-action to push chart release and create a release
packages: write # to push OCI chart package to GitHub Registry
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Optional step if GPG signing is used
- name: Prepare GPG key
run: |
gpg_dir=.cr-gpg
keyring="$gpg_dir/secring.gpg"
passphrase_file="$gpg_dir/passphrase"
mkdir "$gpg_dir"
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring"
echo "$GPG_PASSPHRASE" > "$passphrase_file"
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV"
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV"
env:
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}"
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
- name: Add helm repositories
run: |
for dir in $(ls -d charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
config: "./.github/configs/cr.yaml"
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push chart to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}
done

View file

@ -1,5 +1,5 @@
apiVersion: v2 apiVersion: v2
version: 0.1.0 # Chart version version: 0.1.0-alpha-1 # Chart version
appVersion: "2.0.3" # Penpot version appVersion: "2.0.3" # Penpot version
type: application type: application
name: penpot name: penpot
@ -21,6 +21,10 @@ keywords:
- opensource - opensource
- ux - ux
- ui - ui
annotations:
artifacthub.io/signKey: |
fingerprint: F0B526DC641A6DCBD94A2B2BA11A82757E9E6942
url: https://penpot.github.io/penpot-helm/pubkey.asc
dependencies: dependencies:
- name: postgresql - name: postgresql
version: 15.x.x # appVersion >= 16.2.0 version: 15.x.x # appVersion >= 16.2.0

View file

@ -1,6 +1,6 @@
# penpot # penpot
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 2.0.3](https://img.shields.io/badge/AppVersion-2.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.1.0-alpha-1](https://img.shields.io/badge/Version-0.1.0--alpha--1-informational?style=flat-square) ![AppVersion: 2.0.3](https://img.shields.io/badge/AppVersion-2.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
Helm chart for Penpot, the Open Source design and prototyping platform. Helm chart for Penpot, the Open Source design and prototyping platform.