Compare commits
8
Commits
f760568ac5
...
2.0.0-rc-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbe754df4e
|
||
|
|
91a57cea52
|
||
|
|
0594cea675 | ||
|
|
0c323bc2a3
|
||
|
|
b7eec51d27
|
||
|
|
3427a9a962
|
||
|
|
d27029e01f
|
||
|
|
63d4db362a
|
@@ -8,8 +8,9 @@ if [ ! -f "${CHART_FILE}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DEFAULT_NEW_TAG="$(git tag --sort=-version:refname | head -n 1)"
|
# Exclude prerelease tags (matching -rc or -rc-<digits>) from default tag selection
|
||||||
DEFAULT_OLD_TAG="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
|
DEFAULT_NEW_TAG="$(git tag --sort=-version:refname | grep --invert-match --perl-regexp '\-rc(-[0-9]+)?$' | head --lines 1)"
|
||||||
|
DEFAULT_OLD_TAG="$(git tag --sort=-version:refname | grep --invert-match --perl-regexp '\-rc(-[0-9]+)?$' | head --lines 2 | tail --lines 1)"
|
||||||
|
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
||||||
@@ -54,6 +55,13 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if NEW_TAG is a prerelease (matches -rc or -rc-<digits> suffix)
|
||||||
|
if [[ "${NEW_TAG}" =~ -rc(-[0-9]+)?$ ]]; then
|
||||||
|
echo "INFO: Tag '${NEW_TAG}' is a prerelease, setting prerelease annotation and skipping changelog."
|
||||||
|
yq --no-colors --inplace ".annotations.\"artifacthub.io/prerelease\" = \"true\" | sort_keys(.)" "${CHART_FILE}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
CHANGE_LOG_YAML=$(mktemp)
|
CHANGE_LOG_YAML=$(mktemp)
|
||||||
echo "[]" > "${CHANGE_LOG_YAML}"
|
echo "[]" > "${CHANGE_LOG_YAML}"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
name: Upload ArtifactHub Metadata
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 1 * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upload-metadata:
|
||||||
|
name: "Upload artifacthub-repo.yml to OCI registry"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6.0.2
|
||||||
|
- uses: docker/login-action@v4.1.0
|
||||||
|
with:
|
||||||
|
registry: ${{ github.server_url }}
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
- uses: oras-project/setup-oras@v2.0.0
|
||||||
|
with:
|
||||||
|
version: 1.3.2 # renovate: datasource=github-tags depName=oras-project/oras extractVersion='^v?(?<version>.*)$'
|
||||||
|
- name: Extract meta information
|
||||||
|
run: |
|
||||||
|
echo "GITEA_SERVER_HOSTNAME=$(echo "${GITHUB_SERVER_URL}" | cut -d '/' -f 3)" >> $GITHUB_ENV
|
||||||
|
echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
|
echo "REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2 | sed --regexp-extended 's/-charts?//g')" >> $GITHUB_ENV
|
||||||
|
echo "REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1)" >> $GITHUB_ENV
|
||||||
|
- name: Push artifacthub-repo.yml
|
||||||
|
run: |
|
||||||
|
oras push ${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}/${REPOSITORY_NAME}:artifacthub.io \
|
||||||
|
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
|
||||||
|
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
|
||||||
|
- name: Push public cosign key
|
||||||
|
env:
|
||||||
|
COSIGN_PUBLIC_KEY: ${{ vars.COSIGN_PUBLIC_KEY }}
|
||||||
|
run: |
|
||||||
|
echo "${COSIGN_PUBLIC_KEY}" > cosign.pub
|
||||||
|
oras push ${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}/${REPOSITORY_NAME}:cosign.pub \
|
||||||
|
--artifact-type application/vnd.dev.cosign.public-key.v1 \
|
||||||
|
--annotation org.opencontainers.image.title=cosign.pub \
|
||||||
|
cosign.pub:application/vnd.dev.cosign.public-key.v1
|
||||||
+124
-22
@@ -1,5 +1,10 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY_FILE: ${{ runner.temp }}/private.key
|
||||||
|
GPG_PRIVATE_KEY_FINGERPRINT: ${{ vars.GPG_PRIVATE_KEY_FINGERPRINT }}
|
||||||
|
GPG_PRIVATE_KEY_PASSPHRASE_FILE: ${{ runner.temp }}/passphrase.txt
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
@@ -7,14 +12,58 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-chart:
|
publish-chart:
|
||||||
container:
|
|
||||||
image: docker.io/volkerraschek/helm:3.19.2
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install packages via apk
|
- uses: volker-raschek/cosign-installer@v4.1.2-rc4
|
||||||
|
with:
|
||||||
|
cosign-release: "v3.0.6" # renovate: datasource=github-tags depName=sigstore/cosign
|
||||||
|
|
||||||
|
- uses: azure/setup-helm@v5.0.0
|
||||||
|
with:
|
||||||
|
version: "v4.1.4" # renovate: datasource=github-tags depName=helm/helm
|
||||||
|
|
||||||
|
- name: Install helm plugins
|
||||||
|
env:
|
||||||
|
HELM_SIGSTORE_VERSION: "0.3.0" # renovate: datasource=github-tags depName=sigstore/helm-sigstore extractVersion='^v(?<version>\d+\.\d+\.\d+)$'
|
||||||
|
HELM_SCHEMA_VALUES_VERSION: "2.4.0" # renovate: datasource=github-tags depName=losisin/helm-values-schema-json extractVersion='^v(?<version>\d+\.\d+\.\d+)$'
|
||||||
|
HELM_UNITTEST_VERSION: "1.0.3" # renovate: datasource=github-tags depName=helm-unittest/helm-unittest extractVersion='^v(?<version>\d+\.\d+\.\d+)$'
|
||||||
run: |
|
run: |
|
||||||
apk update
|
helm plugin install --verify=false https://github.com/sigstore/helm-sigstore.git --version "${HELM_SIGSTORE_VERSION}" 1> /dev/null
|
||||||
apk add git npm jq yq
|
helm plugin install --verify=false https://github.com/losisin/helm-values-schema-json.git --version "${HELM_SCHEMA_VALUES_VERSION}" 1> /dev/null
|
||||||
|
helm plugin install --verify=false https://github.com/helm-unittest/helm-unittest.git --version "${HELM_UNITTEST_VERSION}" 1> /dev/null
|
||||||
|
helm plugin list
|
||||||
|
|
||||||
|
- name: GPG configuration
|
||||||
|
env:
|
||||||
|
GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
run: |
|
||||||
|
# Configure GPG and GPG Agent
|
||||||
|
mkdir --parents "${HOME}/.gnupg"
|
||||||
|
chmod 0700 "${HOME}/.gnupg"
|
||||||
|
|
||||||
|
cat > "${HOME}/.gnupg/gpg.conf" <<EOF
|
||||||
|
use-agent
|
||||||
|
pinentry-mode loopback
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > "${HOME}/.gnupg/gpg-agent.conf" <<EOF
|
||||||
|
allow-loopback-pinentry
|
||||||
|
max-cache-ttl 86400
|
||||||
|
default-cache-ttl 86400
|
||||||
|
EOF
|
||||||
|
|
||||||
|
gpgconf --kill gpg-agent
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
|
||||||
|
# Import GPG private key
|
||||||
|
cat 1> "${GPG_PRIVATE_KEY_PASSPHRASE_FILE}" <<< "${GPG_PRIVATE_KEY_PASSPHRASE}"
|
||||||
|
cat 1> "${GPG_PRIVATE_KEY_FILE}" <<< "${GPG_PRIVATE_KEY}"
|
||||||
|
gpg --batch --yes --passphrase-fd 0 --import "${GPG_PRIVATE_KEY_FILE}" <<< "${GPG_PRIVATE_KEY_PASSPHRASE}"
|
||||||
|
|
||||||
|
# Export GPG keyring
|
||||||
|
gpg --batch --yes --export "${GPG_PRIVATE_KEY_FINGERPRINT}" 1> "${HOME}/.gnupg/pubring.gpg"
|
||||||
|
gpg --batch --yes --passphrase-fd 0 --export-secret-keys "${GPG_PRIVATE_KEY_FINGERPRINT}" 1> "${HOME}/.gnupg/secring.gpg" <<< "${GPG_PRIVATE_KEY_PASSPHRASE}"
|
||||||
|
|
||||||
- uses: actions/checkout@v6.0.2
|
- uses: actions/checkout@v6.0.2
|
||||||
with:
|
with:
|
||||||
@@ -28,9 +77,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Extract meta information
|
- name: Extract meta information
|
||||||
run: |
|
run: |
|
||||||
|
echo "GITEA_SERVER_HOSTNAME=$(echo "${GITHUB_SERVER_URL}" | cut --delimiter '/' --fields 3)" >> $GITHUB_ENV
|
||||||
echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
echo "REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2 | sed --regexp-extended 's/-charts?//g')" >> $GITHUB_ENV
|
echo "REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut --delimiter '/' --fields 2 | sed --regexp-extended 's/-charts?//g')" >> $GITHUB_ENV
|
||||||
echo "REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1)" >> $GITHUB_ENV
|
echo "REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut --delimiter '/' --fields 1)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Update Helm Chart version in README.md
|
- name: Update Helm Chart version in README.md
|
||||||
run: sed -i -E "s/^CHART_VERSION=.*/CHART_VERSION=${PACKAGE_VERSION}/g" README.md
|
run: sed -i -E "s/^CHART_VERSION=.*/CHART_VERSION=${PACKAGE_VERSION}/g" README.md
|
||||||
@@ -38,24 +88,76 @@ jobs:
|
|||||||
- name: Package chart
|
- name: Package chart
|
||||||
run: |
|
run: |
|
||||||
helm dependency build
|
helm dependency build
|
||||||
helm package --version "${PACKAGE_VERSION}" ./
|
helm package \
|
||||||
|
--sign \
|
||||||
|
--key "$(gpg --with-colons --list-keys "${GPG_PRIVATE_KEY_FINGERPRINT}" | grep uid | cut --delimiter ':' --fields 10)" \
|
||||||
|
--keyring "${HOME}/.gnupg/secring.gpg" \
|
||||||
|
--passphrase-file "${GPG_PRIVATE_KEY_PASSPHRASE_FILE}" \
|
||||||
|
--version "${PACKAGE_VERSION}" ./
|
||||||
|
|
||||||
- name: Upload Chart to ChartMuseum
|
- uses: docker/login-action@v4.2.0
|
||||||
|
with:
|
||||||
|
registry: ${{ github.server_url }}
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload Chart to Gitea (OCI)
|
||||||
env:
|
env:
|
||||||
|
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
|
||||||
|
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
||||||
|
run: |
|
||||||
|
helm push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz oci://${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}
|
||||||
|
cosign sign --yes --upload=true --key=env://COSIGN_PRIVATE_KEY ${GITEA_SERVER_HOSTNAME}/${REPOSITORY_OWNER}/${REPOSITORY_NAME}:${PACKAGE_VERSION}
|
||||||
|
|
||||||
|
- name: Upload Chart to Gitea (Helm)
|
||||||
|
env:
|
||||||
|
GITEA_REGISTRY_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
run: |
|
||||||
|
curl \
|
||||||
|
--fail \
|
||||||
|
--show-error \
|
||||||
|
--request POST \
|
||||||
|
--user "${REPOSITORY_OWNER}:${GITEA_REGISTRY_TOKEN}" \
|
||||||
|
--upload-file "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz" \
|
||||||
|
https://${GITEA_SERVER_HOSTNAME}/api/packages/${REPOSITORY_OWNER}/helm/api/charts
|
||||||
|
|
||||||
|
# NOTE:
|
||||||
|
# Gitea does currently not support uploading Helm chart provenance files, so we skip this step for now. Once
|
||||||
|
# Gitea supports this, we can simply uncomment the following lines to upload the provenance file as well.
|
||||||
|
#
|
||||||
|
# https://github.com/helm/helm/issues/31866
|
||||||
|
#
|
||||||
|
# if [ -f "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov" ]; then
|
||||||
|
# curl \
|
||||||
|
# --fail \
|
||||||
|
# --show-error \
|
||||||
|
# --request POST \
|
||||||
|
# --user "${CHARTMUSEUM_USERNAME}:${CHARTMUSEUM_PASSWORD}" \
|
||||||
|
# --upload-file "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov" \
|
||||||
|
# https://${GITEA_SERVER_HOSTNAME}/api/packages/${REPOSITORY_OWNER}/helm/api/prov
|
||||||
|
# fi
|
||||||
|
|
||||||
|
- name: Upload Chart to Chartmuseum (Helm)
|
||||||
|
env:
|
||||||
|
CHARTMUSEUM_HOSTNAME: ${{ vars.CHARTMUSEUM_HOSTNAME }}
|
||||||
|
CHARTMUSEUM_USERNAME: ${{ secrets.CHARTMUSEUM_USERNAME }}
|
||||||
CHARTMUSEUM_PASSWORD: ${{ secrets.CHARTMUSEUM_PASSWORD }}
|
CHARTMUSEUM_PASSWORD: ${{ secrets.CHARTMUSEUM_PASSWORD }}
|
||||||
CHARTMUSEUM_REPOSITORY: ${{ vars.CHARTMUSEUM_REPOSITORY }}
|
CHARTMUSEUM_REPOSITORY: ${{ vars.CHARTMUSEUM_REPOSITORY }}
|
||||||
CHARTMUSEUM_USERNAME: ${{ secrets.CHARTMUSEUM_USERNAME }}
|
|
||||||
CHARTMUSEUM_HOSTNAME: ${{ vars.CHARTMUSEUM_HOSTNAME }}
|
|
||||||
run: |
|
run: |
|
||||||
helm repo add --username ${CHARTMUSEUM_USERNAME} --password ${CHARTMUSEUM_PASSWORD} chartmuseum https://${CHARTMUSEUM_HOSTNAME}/${CHARTMUSEUM_REPOSITORY}
|
curl \
|
||||||
helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz chartmuseum
|
--fail \
|
||||||
helm repo remove chartmuseum
|
--show-error \
|
||||||
|
--request POST \
|
||||||
|
--user "${CHARTMUSEUM_USERNAME}:${CHARTMUSEUM_PASSWORD}" \
|
||||||
|
--upload-file "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz" \
|
||||||
|
https://${CHARTMUSEUM_HOSTNAME}/api/${CHARTMUSEUM_REPOSITORY}/charts
|
||||||
|
|
||||||
- name: Upload Chart to Gitea
|
if [ -f "${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov" ]; then
|
||||||
env:
|
curl \
|
||||||
GITEA_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
--fail \
|
||||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
--show-error \
|
||||||
run: |
|
--request POST \
|
||||||
helm repo add --username ${REPOSITORY_OWNER} --password ${GITEA_PACKAGE_REGISTRY_TOKEN} gitea ${GITEA_SERVER_URL}/api/packages/${REPOSITORY_OWNER}/helm
|
--user "${CHARTMUSEUM_USERNAME}:${CHARTMUSEUM_PASSWORD}" \
|
||||||
helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz gitea
|
--upload-file ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz.prov \
|
||||||
helm repo remove gitea
|
https://${CHARTMUSEUM_HOSTNAME}/api/${CHARTMUSEUM_REPOSITORY}/prov
|
||||||
|
fi
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
charts
|
charts
|
||||||
|
cosign*
|
||||||
node_modules
|
node_modules
|
||||||
target
|
target
|
||||||
!values.yaml
|
!values.yaml
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
annotations:
|
annotations:
|
||||||
|
artifacthub.io/license: MIT
|
||||||
artifacthub.io/links: |
|
artifacthub.io/links: |
|
||||||
- name: Athens proxy (binary)
|
- name: Athens proxy (binary)
|
||||||
url: https://github.com/gomods/athens
|
url: https://github.com/gomods/athens
|
||||||
- name: support
|
- name: support
|
||||||
url: https://git.cryptic.systems/volker.raschek/athens-proxy-charts/issues
|
url: https://git.cryptic.systems/volker.raschek/athens-proxy-charts/issues
|
||||||
|
artifacthub.io/operator: "false"
|
||||||
|
artifacthub.io/prerelease: "false"
|
||||||
|
artifacthub.io/signKey: |
|
||||||
|
fingerprint: 3B0CE9853CAD76076260025383D342258456906E
|
||||||
|
url: https://keys.openpgp.org/vks/v1/by-fingerprint/3B0CE9853CAD76076260025383D342258456906E
|
||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: athens-proxy
|
name: athens-proxy
|
||||||
description: Athens proxy server for golang
|
description: Athens proxy server for golang
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ spec:
|
|||||||
| `config.downloadMode.configMap.annotations` | Additional annotations of the config map containing the download mode file. | `{}` |
|
| `config.downloadMode.configMap.annotations` | Additional annotations of the config map containing the download mode file. | `{}` |
|
||||||
| `config.downloadMode.configMap.labels` | Additional labels of the config map containing the download mode file. | `{}` |
|
| `config.downloadMode.configMap.labels` | Additional labels of the config map containing the download mode file. | `{}` |
|
||||||
| `config.gitConfig.enabled` | Enable mounting of a .gitconfig file into the container file system. | `false` |
|
| `config.gitConfig.enabled` | Enable mounting of a .gitconfig file into the container file system. | `false` |
|
||||||
| `config.gitConfig.addSHASumAnnotation` | Add an pod annotation with the sha sum of the config map containing the Git config. | `true` |
|
| `config.gitConfig.addSHASumAnnotation` | Add an pod annotation with the sha sum of the config map containing the git config. | `true` |
|
||||||
| `config.gitConfig.existingConfigMap.enabled` | Enable to use an external config map for mounting the .gitconfig file. | `false` |
|
| `config.gitConfig.existingConfigMap.enabled` | Enable to use an external config map for mounting the .gitconfig file. | `false` |
|
||||||
| `config.gitConfig.existingConfigMap.configMapName` | The name of the existing config map which should be used to mount the .gitconfig file. | `""` |
|
| `config.gitConfig.existingConfigMap.configMapName` | The name of the existing config map which should be used to mount the .gitconfig file. | `""` |
|
||||||
| `config.gitConfig.existingConfigMap.gitConfigKey` | The name of the key inside the config map where the content of the .gitconfig file is stored. | `nil` |
|
| `config.gitConfig.existingConfigMap.gitConfigKey` | The name of the key inside the config map where the content of the .gitconfig file is stored. | `nil` |
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
repositoryID: 4c206fe5-b83a-457a-bcad-7dd664f8b70c
|
||||||
Reference in New Issue
Block a user