Compare commits
6 Commits
main
...
feat/suppo
Author | SHA1 | Date | |
---|---|---|---|
2b1979b43c | |||
de74eab00e | |||
![]() |
db177a356f | ||
![]() |
d29a7e84a4 | ||
![]() |
31fa278145 | ||
![]() |
52c249eb08 |
114
.gitea/scripts/add-annotations.sh
Executable file
114
.gitea/scripts/add-annotations.sh
Executable file
@ -0,0 +1,114 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
CHART_FILE="Chart.yaml"
|
||||||
|
if [ ! -f "${CHART_FILE}" ]; then
|
||||||
|
echo "ERROR: ${CHART_FILE} not found!" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEFAULT_NEW_TAG="$(git tag --sort=-version:refname | head -n 1)"
|
||||||
|
DEFAULT_OLD_TAG="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
|
||||||
|
|
||||||
|
if [ -z "${1}" ]; then
|
||||||
|
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
||||||
|
if [ -z "${OLD_TAG}" ]; then
|
||||||
|
OLD_TAG="${DEFAULT_OLD_TAG}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
while [ -z "$(git tag --list "${OLD_TAG}")" ]; do
|
||||||
|
echo "ERROR: Tag '${OLD_TAG}' not found!" 1>&2
|
||||||
|
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
||||||
|
if [ -z "${OLD_TAG}" ]; then
|
||||||
|
OLD_TAG="${DEFAULT_OLD_TAG}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
OLD_TAG=${1}
|
||||||
|
if [ -z "$(git tag --list "${OLD_TAG}")" ]; then
|
||||||
|
echo "ERROR: Tag '${OLD_TAG}' not found!" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${2}" ]; then
|
||||||
|
read -p "Enter end tag [${DEFAULT_NEW_TAG}]: " NEW_TAG
|
||||||
|
if [ -z "${NEW_TAG}" ]; then
|
||||||
|
NEW_TAG="${DEFAULT_NEW_TAG}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
while [ -z "$(git tag --list "${NEW_TAG}")" ]; do
|
||||||
|
echo "ERROR: Tag '${NEW_TAG}' not found!" 1>&2
|
||||||
|
read -p "Enter end tag [${DEFAULT_NEW_TAG}]: " NEW_TAG
|
||||||
|
if [ -z "${NEW_TAG}" ]; then
|
||||||
|
NEW_TAG="${DEFAULT_NEW_TAG}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
NEW_TAG=${2}
|
||||||
|
|
||||||
|
if [ -z "$(git tag --list "${NEW_TAG}")" ]; then
|
||||||
|
echo "ERROR: Tag '${NEW_TAG}' not found!" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
CHANGE_LOG_YAML=$(mktemp)
|
||||||
|
echo "[]" > "${CHANGE_LOG_YAML}"
|
||||||
|
|
||||||
|
function map_type_to_kind() {
|
||||||
|
case "${1}" in
|
||||||
|
feat)
|
||||||
|
echo "added"
|
||||||
|
;;
|
||||||
|
fix)
|
||||||
|
echo "fixed"
|
||||||
|
;;
|
||||||
|
chore|style|test|ci|docs|refac)
|
||||||
|
echo "changed"
|
||||||
|
;;
|
||||||
|
revert)
|
||||||
|
echo "removed"
|
||||||
|
;;
|
||||||
|
sec)
|
||||||
|
echo "security"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "skip"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
COMMIT_TITLES="$(git log --pretty=format:"%s" "${OLD_TAG}..${NEW_TAG}")"
|
||||||
|
|
||||||
|
echo "INFO: Generate change log entries from ${OLD_TAG} until ${NEW_TAG}"
|
||||||
|
|
||||||
|
while IFS= read -r line; do
|
||||||
|
if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then
|
||||||
|
TYPE="${BASH_REMATCH[1]}"
|
||||||
|
KIND=$(map_type_to_kind "${TYPE}")
|
||||||
|
|
||||||
|
if [ "${KIND}" == "skip" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESC="${BASH_REMATCH[3]}"
|
||||||
|
|
||||||
|
echo "- ${KIND}: ${DESC}"
|
||||||
|
|
||||||
|
jq --arg kind "${KIND}" --arg description "${DESC}" '. += [ $ARGS.named ]' < "${CHANGE_LOG_YAML}" > "${CHANGE_LOG_YAML}.new"
|
||||||
|
mv "${CHANGE_LOG_YAML}.new" "${CHANGE_LOG_YAML}"
|
||||||
|
|
||||||
|
fi
|
||||||
|
done <<< "${COMMIT_TITLES}"
|
||||||
|
|
||||||
|
if [ -s "${CHANGE_LOG_YAML}" ]; then
|
||||||
|
yq --inplace --input-format json --output-format yml "${CHANGE_LOG_YAML}"
|
||||||
|
yq --no-colors --inplace ".annotations.\"artifacthub.io/changes\" |= loadstr(\"${CHANGE_LOG_YAML}\") | sort_keys(.)" "${CHART_FILE}"
|
||||||
|
else
|
||||||
|
echo "ERROR: Changelog file is empty: ${CHANGE_LOG_YAML}" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm "${CHANGE_LOG_YAML}"
|
@ -5,33 +5,51 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
|
|
||||||
env:
|
|
||||||
# renovate: datasource=docker depName=alpine/helm
|
|
||||||
HELM_VERSION: "3.17.3"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate-chart-publish:
|
generate-chart-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: install tools
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install packages via apt
|
||||||
run: |
|
run: |
|
||||||
apt update -y
|
apt update --yes
|
||||||
apt install -y curl ca-certificates curl gnupg
|
apt install --yes curl ca-certificates curl gnupg jq
|
||||||
# helm
|
|
||||||
curl -O https://get.helm.sh/helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz
|
- name: Install helm
|
||||||
tar -xzf helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz
|
env:
|
||||||
mv linux-amd64/helm /usr/local/bin/
|
# renovate: datasource=docker depName=alpine/helm
|
||||||
rm -rf linux-amd64 helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz
|
HELM_VERSION: "3.18.2"
|
||||||
|
run: |
|
||||||
|
curl --fail --location --output /dev/stdout --silent --show-error https://get.helm.sh/helm-v${HELM_VERSION}-linux-$(dpkg --print-architecture).tar.gz | tar --extract --gzip --file /dev/stdin
|
||||||
|
mv linux-$(dpkg --print-architecture)/helm /usr/local/bin/
|
||||||
|
rm --force --recursive linux-$(dpkg --print-architecture) helm-v${HELM_VERSION}-linux-$(dpkg --print-architecture).tar.gz
|
||||||
helm version
|
helm version
|
||||||
# docker
|
|
||||||
|
- name: Install yq
|
||||||
|
env:
|
||||||
|
YQ_VERSION: v4.45.4 # renovate: datasource=github-releases depName=mikefarah/yq
|
||||||
|
run: |
|
||||||
|
curl --fail --location --output /dev/stdout --silent --show-error https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz | tar --extract --gzip --file /dev/stdin
|
||||||
|
mv yq_linux_$(dpkg --print-architecture) /usr/local/bin
|
||||||
|
rm --force --recursive yq_linux_$(dpkg --print-architecture) yq_linux_$(dpkg --print-architecture).tar.gz
|
||||||
|
yq --version
|
||||||
|
|
||||||
|
- name: Install docker-ce via apt
|
||||||
|
run: |
|
||||||
install -m 0755 -d /etc/apt/keyrings
|
install -m 0755 -d /etc/apt/keyrings
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
curl --fail --location --silent --show-error https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
chmod a+r /etc/apt/keyrings/docker.gpg
|
chmod a+r /etc/apt/keyrings/docker.gpg
|
||||||
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
apt update -y
|
apt update --yes
|
||||||
apt install -y python3 python3-pip apt-transport-https docker-ce-cli
|
apt install --yes python3 python3-pip apt-transport-https docker-ce-cli
|
||||||
|
|
||||||
|
- name: Install awscli
|
||||||
|
run: |
|
||||||
pip install awscli --break-system-packages
|
pip install awscli --break-system-packages
|
||||||
|
aws --version
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
@ -41,6 +59,15 @@ jobs:
|
|||||||
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
|
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
|
||||||
fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0
|
fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0
|
||||||
|
|
||||||
|
- name: Add Artifacthub.io annotations
|
||||||
|
run: |
|
||||||
|
NEW_TAG="$(git tag --sort=-version:refname | head --lines 1)"
|
||||||
|
OLD_TAG="$(git tag --sort=-version:refname | head --lines 2 | tail --lines 1)"
|
||||||
|
.gitea/scripts/add-annotations.sh "${OLD_TAG}" "${NEW_TAG}"
|
||||||
|
|
||||||
|
- name: Print Chart.yaml
|
||||||
|
run: cat Chart.yaml
|
||||||
|
|
||||||
# Using helm gpg plugin as 'helm package --sign' has issues with gpg2: https://github.com/helm/helm/issues/2843
|
# Using helm gpg plugin as 'helm package --sign' has issues with gpg2: https://github.com/helm/helm/issues/2843
|
||||||
- name: package chart
|
- name: package chart
|
||||||
run: |
|
run: |
|
||||||
@ -51,7 +78,7 @@ jobs:
|
|||||||
helm package --version "${GITHUB_REF#refs/tags/v}" ./
|
helm package --version "${GITHUB_REF#refs/tags/v}" ./
|
||||||
mkdir gitea
|
mkdir gitea
|
||||||
mv gitea*.tgz gitea/
|
mv gitea*.tgz gitea/
|
||||||
curl -s -L -o gitea/index.yaml https://dl.gitea.com/charts/index.yaml
|
curl --fail --location --output gitea/index.yaml --silent --show-error https://dl.gitea.com/charts/index.yaml
|
||||||
helm repo index gitea/ --url https://dl.gitea.com/charts --merge gitea/index.yaml
|
helm repo index gitea/ --url https://dl.gitea.com/charts --merge gitea/index.yaml
|
||||||
# push to dockerhub
|
# push to dockerhub
|
||||||
echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | helm registry login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} registry-1.docker.io --password-stdin
|
echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | helm registry login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} registry-1.docker.io --password-stdin
|
||||||
|
@ -15,7 +15,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
check-and-test:
|
check-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: alpine/helm:3.17.3
|
container: alpine/helm:3.18.2
|
||||||
steps:
|
steps:
|
||||||
- name: install tools
|
- name: install tools
|
||||||
run: |
|
run: |
|
||||||
|
12
Chart.lock
12
Chart.lock
@ -1,15 +1,15 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 16.7.4
|
version: 16.7.11
|
||||||
- name: postgresql-ha
|
- name: postgresql-ha
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 16.0.6
|
version: 16.0.14
|
||||||
- name: valkey-cluster
|
- name: valkey-cluster
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 3.0.10
|
version: 3.0.14
|
||||||
- name: valkey
|
- name: valkey
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 3.0.9
|
version: 3.0.13
|
||||||
digest: sha256:aeafc605b86db0ff3999cd808af1c9ca3a6a749aae0d42f2fdae89803b3bb60a
|
digest: sha256:87746bfd77ba585a15e85a2c8705ca3e86668298ba012a1adca2bc221deb7f49
|
||||||
generated: "2025-05-25T00:23:17.804516988Z"
|
generated: "2025-06-15T00:04:51.382524189Z"
|
||||||
|
10
Chart.yaml
10
Chart.yaml
@ -4,7 +4,7 @@ description: Gitea Helm chart for Kubernetes
|
|||||||
type: application
|
type: application
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
# renovate datasource=github-releases depName=go-gitea/gitea extractVersion=^v(?<version>.*)$
|
# renovate datasource=github-releases depName=go-gitea/gitea extractVersion=^v(?<version>.*)$
|
||||||
appVersion: 1.23.8
|
appVersion: 1.24.0
|
||||||
icon: https://gitea.com/assets/img/logo.svg
|
icon: https://gitea.com/assets/img/logo.svg
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
@ -36,20 +36,20 @@ dependencies:
|
|||||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
|
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 16.7.4
|
version: 16.7.11
|
||||||
condition: postgresql.enabled
|
condition: postgresql.enabled
|
||||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/Chart.yaml
|
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/Chart.yaml
|
||||||
- name: postgresql-ha
|
- name: postgresql-ha
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 16.0.6
|
version: 16.0.14
|
||||||
condition: postgresql-ha.enabled
|
condition: postgresql-ha.enabled
|
||||||
# https://github.com/bitnami/charts/blob/main/bitnami/valkey-cluster/Chart.yaml
|
# https://github.com/bitnami/charts/blob/main/bitnami/valkey-cluster/Chart.yaml
|
||||||
- name: valkey-cluster
|
- name: valkey-cluster
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 3.0.10
|
version: 3.0.14
|
||||||
condition: valkey-cluster.enabled
|
condition: valkey-cluster.enabled
|
||||||
# https://github.com/bitnami/charts/blob/main/bitnami/valkey/Chart.yaml
|
# https://github.com/bitnami/charts/blob/main/bitnami/valkey/Chart.yaml
|
||||||
- name: valkey
|
- name: valkey
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 3.0.9
|
version: 3.0.13
|
||||||
condition: valkey.enabled
|
condition: valkey.enabled
|
||||||
|
@ -27,7 +27,7 @@ stringData:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- /* multiple replicas assertions */ -}}
|
{{- /* multiple replicas assertions */ -}}
|
||||||
{{- if gt .Values.replicaCount 1.0 -}}
|
{{- if gt (.Values.replicaCount | int) 1 -}}
|
||||||
{{- if .Values.gitea.config.cron -}}
|
{{- if .Values.gitea.config.cron -}}
|
||||||
{{- if .Values.gitea.config.cron.GIT_GC_REPOS -}}
|
{{- if .Values.gitea.config.cron.GIT_GC_REPOS -}}
|
||||||
{{- if eq .Values.gitea.config.cron.GIT_GC_REPOS.ENABLED true -}}
|
{{- if eq .Values.gitea.config.cron.GIT_GC_REPOS.ENABLED true -}}
|
||||||
|
@ -10,7 +10,7 @@ metadata:
|
|||||||
{{ .Values.persistence.labels | toYaml | indent 4}}
|
{{ .Values.persistence.labels | toYaml | indent 4}}
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
{{- if gt .Values.replicaCount 1.0 }}
|
{{- if gt (.Values.replicaCount | int) 1 }}
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- .Values.persistence.accessModes | toYaml | nindent 4 }}
|
{{- .Values.persistence.accessModes | toYaml | nindent 4 }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user