4 Commits

Author SHA1 Message Date
4d70414705 chore(deps): update actions/checkout digest to 93cb6ef (#8)
All checks were successful
CD / Release (push) Successful in 8s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | digest | `08c6903` -> `93cb6ef` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xLjMiLCJ1cGRhdGVkSW5WZXIiOiI0Mi4xLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImFjdGlvbiIsImRlcHMiXX0=-->

Reviewed-on: #8
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-11-22 15:14:27 +01:00
1b3aa245ae chore(deps): pin actions/checkout action to 08c6903 (#6)
All checks were successful
CD / Release (push) Successful in 14s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | pinDigest |  -> `08c6903` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMjUuMiIsInVwZGF0ZWRJblZlciI6IjQxLjEyNS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhY3Rpb24iLCJkZXBzIl19-->

Reviewed-on: #6
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-10-14 08:49:33 +02:00
b569618421 ci: refactor to use own release-git-tag action (#5)
All checks were successful
CD / Release (push) Successful in 15s
Reviewed-on: #5
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-10-13 20:47:02 +02:00
531d8441c4 feat: add release-git-tag (#3)
Some checks failed
CD / Release (push) Failing after 6s
We are adding the release-git-tag action as well as some CICD steps.

Reviewed-on: #3
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-10-13 20:44:17 +02:00
7 changed files with 59 additions and 135 deletions

View File

@@ -1,37 +0,0 @@
# helm-chart-push
A Gitea Action for pushing Helm charts to Gitea's built-in Helm registry. This action simplifies the process of publishing Helm charts to your Gitea instance's package registry.
## Usage
### Inputs
| Input | Required | Description | Default |
|-------|----------|-------------|---------|
| `registry-token` | true | The Bearer token for authenticating with the Gitea Helm Registry | - |
| `chart-path` | true | The local path to the Helm chart file (`.tgz` archive) | - |
| `repository-owner` | true | The owner/username of the Gitea Helm Repository | - |
| `gitea-base-url` | false | The base URL of your Gitea instance | `https://gitea.t000-n.de` |
### Basic Example
```yaml
name: Push Helm Chart
on:
push:
branches:
- main
jobs:
push-chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: helm package ./charts/my-chart
- name: Push to Gitea Registry
uses: ./.gitea/actions/helm-chart-push
with:
registry-token: ${{ secrets.GITEA_TOKEN }}
chart-path: ./my-chart-*.tgz
repository-owner: ${{ github.repository_owner }}
```

View File

@@ -1,96 +0,0 @@
name: Push Helm Chart
description: Push a Helm Chart to the Gitea Helm Repository
inputs:
registry-token:
description: The Bearer token for the Gitea Helm Registry
required: true
chart-path:
description: The path to the Helm Chart (e.g., ./my-chart-1.0.0.tgz)
required: true
repository-owner:
description: The owner of the Gitea Helm Repository
required: true
gitea-base-url:
description: The base URL of the Gitea instance (must include protocol)
required: false
default: "https://gitea.t000-n.de"
chart-name:
description: Optional name for the chart (used for logging and validation)
required: false
timeout:
description: Timeout for the HTTP request in seconds
required: false
default: "60"
runs:
using: "composite"
steps:
- name: Validate inputs
shell: bash
run: |
# Validate required inputs
if [[ -z "${{ inputs.registry-token }}" ]]; then
echo "Error: registry-token is required"
exit 1
fi
if [[ -z "${{ inputs.chart-path }}" ]]; then
echo "Error: chart-path is required"
exit 1
fi
if [[ -z "${{ inputs.repository-owner }}" ]]; then
echo "Error: repository-owner is required"
exit 1
fi
# Validate chart file exists
if [[ ! -f "${{ inputs.chart-path }}" ]]; then
echo "Error: Chart file not found at path: ${{ inputs.chart-path }}"
exit 1
fi
# Validate chart file is a valid tar.gz
if ! tar -tzf "${{ inputs.chart-path }}" >/dev/null 2>&1; then
echo "Error: Invalid chart file format. Must be a valid .tgz file"
exit 1
fi
# Validate Gitea base URL format
if [[ ! "${{ inputs.gitea-base-url }}" =~ ^https?:// ]]; then
echo "Error: gitea-base-url must include protocol (http:// or https://)"
exit 1
fi
echo "Input validation passed"
- name: Push Helm Chart
shell: bash
run: |
set -euo pipefail
# Set variables
CHART_PATH="${{ inputs.chart-path }}"
CHART_NAME="${inputs.chart-name:-$(basename "$CHART_PATH" .tgz)}"
TIMEOUT="${{ inputs.timeout }}"
echo "Pushing Helm chart: $CHART_NAME"
# Push chart with proper error handling
RESPONSE=$(curl --fail --show-error \
--silent \
--max-time "$TIMEOUT" \
--header "Authorization: Bearer ${{ inputs.registry-token }}" \
--header "Content-Type: application/gzip" \
--header "User-Agent: GitHub-Actions-Helm-Push/1.0" \
-X POST \
--upload-file "$CHART_PATH" \
"${{ inputs.gitea-base-url }}/api/packages/${{ inputs.repository-owner }}/helm/api/charts" \
2>&1) || {
echo "Failed to push Helm chart"
echo "Response: $RESPONSE"
exit 1
}
echo "Successfully pushed Helm chart: $CHART_NAME"

24
.gitea/workflows/cd.yaml Normal file
View File

@@ -0,0 +1,24 @@
name: CD
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0
- name: Increment tag
id: tag
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@0.1.2
with:
token: ${{ secrets.GITEA_TOKEN }}
- name: Push tag
uses: ./release-git-tag
with:
tag: ${{ steps.tag.outputs.new-tag }}

View File

@@ -1,5 +1,7 @@
# actions # actions
Collection of Gitea friendly actions & workflows. Collection of Gitea friendly actions.
* [helm-chart-push](./.gitea/actions/helm-chart-push/README.md) Push a Helm Chart into the Gitea Helm Chart Registry ## Actions
- [release-git-tag](./release-git-tag//README.md)

View File

@@ -0,0 +1,9 @@
# release-git-tag
Creates and pushes a Git tag to the remote repository.
```yaml
- uses: ./release-git-tag
with:
tag: v1.0.0
```

View File

@@ -0,0 +1,15 @@
name: Release Git tag
description: Releases a Git to origin
inputs:
tag:
description: The tag to release
required: true
runs:
using: "composite"
steps:
- shell: bash
run: |
git tag ${{ inputs.tag }}
git push origin ${{ inputs.tag }}

7
renovate.json Normal file
View File

@@ -0,0 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>t.behrendt/renovate-configs:common",
"local>t.behrendt/renovate-configs:action"
]
}