Compare commits

...

23 Commits

Author SHA1 Message Date
42402355e9
WIP
All checks were successful
generate-chart / generate-chart-publish (push) Successful in 1m21s
2025-06-06 21:07:49 +02:00
8236ad3285
WIP
All checks were successful
generate-chart / generate-chart-publish (push) Successful in 1m27s
2025-06-06 21:05:48 +02:00
a4d1c3da04
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 1m44s
2025-06-06 21:03:26 +02:00
4968a19d49
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 1m55s
2025-06-06 20:56:50 +02:00
154da3c94c
WIP 2025-06-06 20:56:17 +02:00
2b336de657
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 1m33s
2025-06-06 20:53:34 +02:00
495e03e5ea
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 1m24s
2025-06-06 20:51:23 +02:00
7445fe65c0
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 32s
2025-06-06 20:48:55 +02:00
8d77652523
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 31s
2025-06-06 20:47:32 +02:00
73625c4807
WIP 2025-06-06 20:46:36 +02:00
fe46a4b896
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 1m39s
2025-06-06 20:40:49 +02:00
6ea72ebc90
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 30s
2025-06-06 17:00:59 +02:00
0ea64ae840
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 1m34s
2025-06-06 16:56:58 +02:00
f84f84ed53
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Failing after 30s
2025-06-06 16:43:44 +02:00
10cef87bc3
WIP
Some checks failed
generate-chart / generate-chart-publish (push) Has been cancelled
2025-06-06 16:42:19 +02:00
40acee36ff
WIP
All checks were successful
generate-chart / generate-chart-publish (push) Successful in 10s
2025-06-06 16:40:54 +02:00
c17d70067c
WIP
All checks were successful
generate-chart / generate-chart-publish (push) Successful in 9s
2025-06-06 16:39:51 +02:00
ba6415b5b8
WIP
All checks were successful
changelog / changelog (push) Successful in 20s
check-and-test / check-and-test (push) Successful in 1m46s
2025-06-06 16:39:05 +02:00
540350dbfa
feat: add Artifacthub annotation 'artifacthub.io/changes'
The following PR add the annotation 'artifacthub.io/changes'. For each semantic
commit will be the annotation extended. Further information can be found in the
documentation of
[Artifacthub.io](https://artifacthub.io/docs/topics/annotations/helm/#supported-annotations).

The CI has been adapted. The binary jq as well as yq in >= v4.0 is required.
Otherwise will not be concatenated the YAML file correctly via the yq expression,
because the `loadstr()` expression is not available in lower versions.

Additionally the relation between the semantic commit and the Artifacthub.io
change log type should be clarified. The current relationshiop can be adapted if
needed.

Furthermore, yq will be installed as part of the CI steps. It would be great if
yq is also available as deb package in >=v4.0. This would reduce the boiler
plate to install yq and maintain the version via renovate.

Regarding the renovate expression. In my environment works this expression, but
I don't know if it also works in this gitea/renovate instance.
2025-06-05 08:10:30 +02:00
Renovate Bot
0d532363eb chore(deps): update subcharts (minor & patch) (#879)
All checks were successful
changelog / changelog (push) Successful in 20s
check-and-test / check-and-test (push) Successful in 1m47s
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-05-26 00:09:45 +00:00
Renovate Bot
8f0f44a864 chore(deps): update unittests/bash/bats digest to 5ec2d81 (#878)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-05-25 00:22:08 +00:00
Renovate Bot
cf86118976 chore(deps): update subcharts (minor & patch) (#874)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2025-05-19 00:20:49 +00:00
pat-s
7f96084a30
ci: fully re-enable release-workflow 2025-05-16 17:10:37 +02:00
8 changed files with 222 additions and 154 deletions

114
.gitea/scripts/add-annotations.sh Executable file
View 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 changed --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}"

View File

@ -1,32 +0,0 @@
name: changelog
on:
push:
branches:
- main
jobs:
changelog:
runs-on: ubuntu-latest
container: docker.io/thegeeklab/git-sv:2.0.1
steps:
- name: install tools
run: |
apk add -q --update --no-cache nodejs curl jq sed
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate upcoming changelog
run: |
git sv rn -o changelog.md
export RELEASE_NOTES=$(cat changelog.md)
export ISSUE_NUMBER=$(curl -s "https://gitea.com/api/v1/repos/gitea/helm-gitea/issues?state=open&q=Changelog%20for%20upcoming%20version" | jq '.[].number')
echo $RELEASE_NOTES
JSON_DATA=$(echo "" | jq -Rs --arg title 'Changelog for upcoming version' --arg body "$(cat changelog.md)" '{title: $title, body: $body}')
if [ -z "$ISSUE_NUMBER" ]; then
curl -s -X POST "https://gitea.com/api/v1/repos/gitea/helm-gitea/issues" -H "Authorization: token ${{ secrets.ISSUE_RW_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA"
else
curl -s -X PATCH "https://gitea.com/api/v1/repos/gitea/helm-gitea/issues/$ISSUE_NUMBER" -H "Authorization: token ${{ secrets.ISSUE_RW_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA"
fi

View File

@ -1,19 +0,0 @@
name: commitlint
on:
pull_request:
branches:
- "*"
types:
- opened
- edited
jobs:
check-and-test:
runs-on: ubuntu-latest
container: commitlint/commitlint:19.8.1
steps:
- uses: actions/checkout@v4
- name: check PR title
run: |
echo "${{ gitea.event.pull_request.title }}" | commitlint --config .commitlintrc.json

View File

@ -2,7 +2,7 @@ name: generate-chart
on: on:
push: push:
tags: branches:
- "*" - "*"
env: env:
@ -10,28 +10,67 @@ env:
HELM_VERSION: "3.17.3" 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:
# run: | fetch-depth: 0
# apt update -y
# apt install -y curl ca-certificates curl gnupg - name: Determine Architecture and Operating System to support x86_64 and ARM based CI nodes
# # helm run: |
# curl -O https://get.helm.sh/helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz # determine operating system
# tar -xzf helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz OS=$(uname | tr '[:upper:]' '[:lower:]')
# mv linux-amd64/helm /usr/local/bin/ echo "OS=${OS}" >> $GITHUB_ENV
# rm -rf linux-amd64 helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz echo "INFO: Set environment variable OS=${OS}"
# helm version
# # docker # determine architecture
# install -m 0755 -d /etc/apt/keyrings ARCH="$(uname -m)"
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg case "${ARCH}" in
# chmod a+r /etc/apt/keyrings/docker.gpg aarch64) ARCH=arm64;;
# 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 x86_64) ARCH=amd64;;
# apt update -y esac
# apt install -y python3 python3-pip apt-transport-https docker-ce-cli echo "ARCH=${ARCH}" >> $GITHUB_ENV
# pip install awscli --break-system-packages echo "INFO: Set environment variable ARCH=${ARCH}"
- name: Install packages via apt
run: |
apt update --yes
echo "INFO: Install packages via apt"
apt install --yes curl ca-certificates curl gnupg jq
- name: Install helm
run: |
curl --fail --location --output /dev/stdout --silent --show-error https://get.helm.sh/helm-v${{ env.HELM_VERSION }}-${OS}-${ARCH}.tar.gz | tar --extract --gzip --file /dev/stdin
mv ${OS}-${ARCH}/helm /usr/local/bin/
rm --force --recursive ${OS}-${ARCH} helm-v${{ env.HELM_VERSION }}-${OS}-${ARCH}.tar.gz
helm version
- 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_${OS}_${ARCH}.tar.gz | tar --extract --gzip --file /dev/stdin
mv yq_${OS}_${ARCH} /usr/local/bin
rm --force --recursive yq_${OS}_${ARCH} yq_${OS}_${ARCH}.tar.gz
yq --version
- name: Install docker-ce via apt
run: |
echo "INFO: Install docker"
install -m 0755 -d /etc/apt/keyrings
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
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 --yes
apt install --yes python3 python3-pip apt-transport-https docker-ce-cli
- name: Install awscli
run: |
echo "INFO: Install awscli via python pip"
pip install awscli --break-system-packages
aws --version
# - name: Import GPG key # - name: Import GPG key
# id: import_gpg # id: import_gpg
@ -41,6 +80,17 @@ jobs:
# passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} # passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
# fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0 # fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0
- name: Add Artifacthub.io annotations
run: |
NEW_TAG=v12.0.0
OLD_TAG=v11.0.1
# 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 +101,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
@ -69,28 +119,28 @@ jobs:
# run: | # run: |
# aws s3 sync gitea/ s3://${{ secrets.AWS_S3_BUCKET}}/charts/ # aws s3 sync gitea/ s3://${{ secrets.AWS_S3_BUCKET}}/charts/
release-gitea: # release-gitea:
# needs: generate-chart-publish # # needs: generate-chart-publish
runs-on: ubuntu-latest # runs-on: ubuntu-latest
container: docker.io/thegeeklab/git-sv:2.0.1 # container: docker.io/thegeeklab/git-sv:2.0.1
steps: # steps:
- name: install tools # - name: install tools
run: | # run: |
apk add -q --update --no-cache nodejs # apk add -q --update --no-cache nodejs
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
with: # with:
fetch-tags: true # fetch-tags: true
fetch-depth: 0 # fetch-depth: 0
- name: Create changelog # - name: Create changelog
run: | # run: |
git sv current-version # git sv current-version
git sv release-notes -t ${GITHUB_REF#refs/tags/} -o CHANGELOG.md # git sv release-notes -t ${GITHUB_REF#refs/tags/} -o CHANGELOG.md
sed -i '1,2d' CHANGELOG.md # remove version # sed -i '1,2d' CHANGELOG.md # remove version
cat CHANGELOG.md # cat CHANGELOG.md
- name: Release # - name: Release
uses: https://github.com/akkuman/gitea-release-action@v1 # uses: https://github.com/akkuman/gitea-release-action@v1
with: # with:
body_path: CHANGELOG.md # body_path: CHANGELOG.md
token: "${{ secrets.RELEASE_TOKEN }}" # token: "${{ secrets.RELEASE_TOKEN }}"

View File

@ -1,45 +0,0 @@
name: check-and-test
on:
pull_request:
branches:
- "*"
push:
branches:
- main
env:
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
HELM_UNITTEST_VERSION: "v0.8.2"
jobs:
check-and-test:
runs-on: ubuntu-latest
container: alpine/helm:3.17.3
steps:
- name: install tools
run: |
apk update
apk add --update bash make nodejs npm yamllint ncurses
- uses: actions/checkout@v4
- name: install chart dependencies
run: helm dependency build
- name: lint
run: helm lint
- name: template
run: helm template --debug gitea-helm .
- name: prepare unit test environment
run: |
helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
git submodule update --init --recursive
- name: unit tests
env:
TERM: xterm
run: |
make unittests
- name: verify readme
run: |
make readme
git diff --exit-code --name-only README.md
- name: yaml lint
uses: https://github.com/ibiqlik/action-yamllint@v3

View File

@ -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.2 version: 16.7.4
- name: postgresql-ha - name: postgresql-ha
repository: oci://registry-1.docker.io/bitnamicharts repository: oci://registry-1.docker.io/bitnamicharts
version: 16.0.3 version: 16.0.6
- name: valkey-cluster - name: valkey-cluster
repository: oci://registry-1.docker.io/bitnamicharts repository: oci://registry-1.docker.io/bitnamicharts
version: 3.0.5 version: 3.0.10
- name: valkey - name: valkey
repository: oci://registry-1.docker.io/bitnamicharts repository: oci://registry-1.docker.io/bitnamicharts
version: 3.0.4 version: 3.0.9
digest: sha256:9f184e842e4e04f7a1a3791ed92ab2ce085c4cf8f9dc9ce9a70b45b8af4c3c3c digest: sha256:aeafc605b86db0ff3999cd808af1c9ca3a6a749aae0d42f2fdae89803b3bb60a
generated: "2025-05-10T03:23:40.55670864Z" generated: "2025-05-25T00:23:17.804516988Z"

View File

@ -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.2 version: 16.7.4
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.3 version: 16.0.6
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.5 version: 3.0.10
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.4 version: 3.0.9
condition: valkey.enabled condition: valkey.enabled

@ -1 +1 @@
Subproject commit fed179f2960f127463592c312d4b0762d6292260 Subproject commit 5ec2d815109358b3ad86f5aabf289d96e6535ac5