Author SHA1 Message Date
josh f991c2fe15 feat: update
Release Chart / release (push) Successful in 5s
deploy / build (push) Successful in 2m29s
2026-08-01 12:26:59 +03:30
josh cf30022133 ci: switch release pipelines to gitea only
Release Chart / release (push) Successful in 5s
Release / release (push) Successful in 4s
deploy / build (push) Successful in 2m27s
2026-08-01 07:45:36 +03:30
5 changed files with 28 additions and 79 deletions
-9
View File
@@ -20,7 +20,6 @@ jobs:
- name: Container image name - name: Container image name
run: | run: |
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
echo "IMAGE_NAME=${REGISTRY_HOST}/kloude-public/kks-provider-plugin" >> "$GITHUB_ENV" echo "IMAGE_NAME=${REGISTRY_HOST}/kloude-public/kks-provider-plugin" >> "$GITHUB_ENV"
echo "APP_VERSION=$(grep '^appVersion:' charts/kks-provider-plugin/Chart.yaml | awk '{print $2}' | tr -d '\"')" >> "$GITHUB_ENV" echo "APP_VERSION=$(grep '^appVersion:' charts/kks-provider-plugin/Chart.yaml | awk '{print $2}' | tr -d '\"')" >> "$GITHUB_ENV"
@@ -52,11 +51,3 @@ jobs:
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
- name: Make container image public
if: github.event_name != 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
gh api --method PATCH "/orgs/${owner}/packages/container/kks-provider-plugin/visibility" -f visibility=public || true
-6
View File
@@ -117,9 +117,3 @@ jobs:
echo "OCI push failed for $chart (registry token realm/protocol issue). Continuing because chart artifact is already published to Gitea release assets." echo "OCI push failed for $chart (registry token realm/protocol issue). Continuing because chart artifact is already published to Gitea release assets."
fi fi
done done
- name: Make OCI chart public
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api --method PATCH "/orgs/kloude/kks-provider-plugin/packages/container/charts%2Fkks-provider-plugin/visibility" -f visibility=public || true
+25 -61
View File
@@ -48,52 +48,8 @@ jobs:
helm package "${chart_dir}" --destination dist helm package "${chart_dir}" --destination dist
echo "CHART_PACKAGE=dist/kks-provider-plugin-${version}.tgz" >> "$GITHUB_ENV" echo "CHART_PACKAGE=dist/kks-provider-plugin-${version}.tgz" >> "$GITHUB_ENV"
- name: Build changelog - name: Create or update Gitea release
id: changelog if: secrets.GITEA_TOKEN != ''
uses: mikepenz/release-changelog-builder-action@v5
with:
configurationJson: |
{
"template": "#{{CHANGELOG}}\n\n**Full Changelog**: #{{RELEASE_DIFF}}",
"categories": [
{
"title": "## Features",
"commits": ["^feat", "^feature"]
},
{
"title": "## Bug Fixes",
"commits": ["^fix", "^Fix"]
},
{
"title": "## Other Changes",
"commits": [".*"]
}
]
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create or update GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
run: |
if gh release view "$TAG" >/dev/null 2>&1; then
gh release edit "$TAG" --notes "$CHANGELOG"
else
gh release create "$TAG" --title "$TAG" --notes "$CHANGELOG"
fi
- name: Upload Helm chart to release
if: steps.version.outputs.is_app_release == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: gh release upload "$TAG" "$CHART_PACKAGE" --clobber
- name: Upload Helm chart artifact to Gitea release
if: steps.version.outputs.is_app_release == 'true' && secrets.GITEA_TOKEN != ''
env: env:
GITEA_BASE_URL: https://git.kloude.ir GITEA_BASE_URL: https://git.kloude.ir
GITEA_REPO: kloude/kks-provider-plugin GITEA_REPO: kloude/kks-provider-plugin
@@ -102,13 +58,9 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
if [ ! -f "$CHART_PACKAGE" ]; then
echo "Chart package not found: $CHART_PACKAGE"
exit 1
fi
api="${GITEA_BASE_URL}/api/v1/repos/${GITEA_REPO}" api="${GITEA_BASE_URL}/api/v1/repos/${GITEA_REPO}"
file_name=$(basename "$CHART_PACKAGE") release_name="$TAG"
release_body="Release ${TAG}"
release_json=$(curl -fsS \ release_json=$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
@@ -119,10 +71,30 @@ jobs:
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"${api}/releases" \ "${api}/releases" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"target_commitish\":\"${GITHUB_SHA}\"}") -d "{\"tag_name\":\"${TAG}\",\"name\":\"${release_name}\",\"body\":\"${release_body}\",\"target_commitish\":\"${GITHUB_SHA}\"}")
else
release_id=$(python3 -c 'import json,sys; print(json.loads(sys.stdin.read())["id"])' <<< "$release_json")
curl -fsS -X PATCH \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${api}/releases/${release_id}" \
-d "{\"name\":\"${release_name}\",\"body\":\"${release_body}\"}" >/dev/null
release_json=$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${api}/releases/tags/${TAG}")
fi
if [ "${{ steps.version.outputs.is_app_release }}" != "true" ]; then
exit 0
fi
if [ ! -f "$CHART_PACKAGE" ]; then
echo "Chart package not found: $CHART_PACKAGE"
exit 1
fi fi
release_id=$(python3 -c 'import json,sys; print(json.loads(sys.stdin.read())["id"])' <<< "$release_json") release_id=$(python3 -c 'import json,sys; print(json.loads(sys.stdin.read())["id"])' <<< "$release_json")
file_name=$(basename "$CHART_PACKAGE")
existing_assets=$(curl -fsS \ existing_assets=$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
@@ -154,11 +126,3 @@ jobs:
"$CHART_PACKAGE" "$repo"; then "$CHART_PACKAGE" "$repo"; then
echo "OCI push failed (registry token realm/protocol issue). Continuing because chart artifact is already published to Gitea release assets." echo "OCI push failed (registry token realm/protocol issue). Continuing because chart artifact is already published to Gitea release assets."
fi fi
- name: Make OCI chart public
if: steps.version.outputs.is_app_release == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
gh api --method PATCH "/orgs/${owner}/packages/container/charts%2Fkks-provider-plugin/visibility" -f visibility=public || true
+2 -2
View File
@@ -2,8 +2,8 @@ apiVersion: v2
name: kks-provider-plugin name: kks-provider-plugin
description: Combined Kloud provider plugin chart (LoadBalancer + CSI) for kks clusters description: Combined Kloud provider plugin chart (LoadBalancer + CSI) for kks clusters
type: application type: application
version: 1.1.2 version: 1.2.4
appVersion: "1.1.0" appVersion: "1.1.1"
kubeVersion: ">=1.28.0-0" kubeVersion: ">=1.28.0-0"
home: https://github.com/KubelanCloud/kks-provider-plugin home: https://github.com/KubelanCloud/kks-provider-plugin
sources: sources:
+1 -1
View File
@@ -6,7 +6,7 @@ nameOverride: ""
fullnameOverride: "" fullnameOverride: ""
image: image:
repository: registry.kloude.ir/kks/kubelancloud/kks-provider-plugin repository: registry.kloude.ir/kloude-public/kks-provider-plugin:latest
tag: "latest" tag: "latest"
pullPolicy: IfNotPresent pullPolicy: IfNotPresent