3 Commits

Author SHA1 Message Date
c4817357cf add renovate
Some checks failed
CI / lint (push) Failing after 47s
CI / lint (pull_request) Failing after 54s
2025-10-13 20:36:30 +02:00
daf752884e add simple cicd 2025-10-13 20:35:36 +02:00
ff302530f8 feat: add release-git-tag 2025-10-13 20:35:18 +02:00
7 changed files with 15 additions and 98 deletions

View File

@@ -10,15 +10,16 @@ jobs:
name: Release name: Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- run: npm ci
- name: Increment tag - name: Increment tag
id: tag id: tag
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@74d41d9bd9c243f295b53762681c714f3d24fd4c # 0.1.31 uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@0.1.2
with: with:
token: ${{ secrets.GITEA_TOKEN }} token: ${{ secrets.GITEA_TOKEN }}
- name: Push tag - name: Push tag
uses: ./release-git-tag run: |
with: git tag ${{ steps.tag.outputs.new-tag }}
tag: ${{ steps.tag.outputs.new-tag }} git push origin ${{ steps.tag.outputs.new-tag }}

View File

@@ -1,16 +1,14 @@
name: CI name: CI
on: on: [push, pull_request]
pull_request:
jobs: jobs:
test_get-repo-name: lint:
name: Test get-repo-name
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@v5
- id: repo - uses: actions/setup-go@v6
uses: ./get-repo-name with:
- run: | go-version: 1.25.1
test "${{ steps.repo.outputs.name }}" = "actions" || (echo "Expected repo name 'actions', got '${{ steps.repo.outputs.name }}'" && exit 1) - run: go install github.com/rhysd/actionlint/cmd/actionlint@latest
- run: echo "Original repository name is ${{ GITEA_REPOSITORY }}" - run: actionlint

View File

@@ -4,6 +4,4 @@ Collection of Gitea friendly actions.
## Actions ## Actions
- [get-repo-name](./get-repo-name/README.md) - [release-git-tag](./release-git-tag//README.md)
- [release-git-tag](./release-git-tag/README.md)
- [release-helm-chart](./release-helm-chart/README.md)

View File

@@ -1,11 +0,0 @@
# get-repo-name
Outputs the repository name from the Git/Gitea/GitHub environment without the owner.
Example: `t.behrendt/actions``actions`
```yaml
- id: repo
uses: https://gitea.t000-n.de/t.behrendt/actions/get-repo-name@0.0.0
- run: echo "Repository name is ${{ steps.repo.outputs.name }}"
```

View File

@@ -1,16 +0,0 @@
name: Get repo name
description: Outputs the repository name without the owner (e.g. "owner/repo" → "repo")
outputs:
name:
description: The repository name without the owner
value: ${{ steps.repo-name.outputs.name }}
runs:
using: "composite"
steps:
- id: repo-name
shell: bash
run: |
REPO="${GITEA_REPOSITORY:-$GITHUB_REPOSITORY}"
echo "name=${REPO##*/}" >> $GITHUB_OUTPUT

View File

@@ -1,23 +0,0 @@
# release-helm-chart
Packages and releases a Helm chart to a Gitea Helm registry.
## Inputs
| Input | Description | Required |
| ------------------- | ----------------------------- | -------- |
| `tag` | The version tag to release | Yes |
| `name` | The name of the Helm chart | Yes |
| `registry-user` | The username for the registry | Yes |
| `registry-password` | The password for the registry | Yes |
## Example
```yaml
- uses: ./release-helm-chart
with:
tag: v1.2.3
name: my-chart
registry-user: myuser
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
```

View File

@@ -1,30 +0,0 @@
name: Release Helm chart
description: Release the Helm chart
inputs:
tag:
description: The tag to release
required: true
name:
description: The name of the Helm chart
required: true
registry-user:
description: The username for the registry
required: true
registry-password:
description: The password for the registry
required: true
runs:
using: "composite"
steps:
- shell: bash
run: |
helm package ${{ inputs.name }} --version ${{ inputs.tag }}
- shell: bash
run: |
curl --verbose --fail --show-error \
--user ${{ inputs.registry-user }}:${{ inputs.registry-password }} \
-X POST \
--upload-file ./${{ inputs.name }}-${{ inputs.tag }}.tgz \
https://gitea.t000-n.de/api/packages/${{ inputs.registry-user }}/helm/api/charts