Compare commits
1 Commits
0.1.6
...
feat-add-n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb9434e1e3 |
@@ -1,24 +0,0 @@
|
|||||||
name: CD
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Increment tag
|
|
||||||
id: tag
|
|
||||||
uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@f377151b3a8843433cead1ca8a94936cdb848f11 # 0.1.27
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
- name: Push tag
|
|
||||||
uses: ./release-git-tag
|
|
||||||
with:
|
|
||||||
tag: ${{ steps.tag.outputs.new-tag }}
|
|
||||||
20
.gitea/workflows/run_node.yaml
Normal file
20
.gitea/workflows/run_node.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Run NodeJS script with package cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
script:
|
||||||
|
description: Path to the Node.js script to run
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-node:
|
||||||
|
name: Run NodeJS script
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: ./.gitea/workflows/setup_node.yaml
|
||||||
|
with:
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
- run: npm run ${{ inputs.script }}
|
||||||
33
.gitea/workflows/setup_node.yaml
Normal file
33
.gitea/workflows/setup_node.yaml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Setup NodeJS with package cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
node-version-file:
|
||||||
|
description: Path to the Node.js version file
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: .nvmrc
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-node:
|
||||||
|
name: Setup NodeJS
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
id: cache-modules
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.npm
|
||||||
|
node_modules
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: ${{ inputs.node-version-file }}
|
||||||
|
cache: "npm"
|
||||||
|
- if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||||
|
run: npm ci
|
||||||
@@ -1,8 +1,3 @@
|
|||||||
# actions
|
# actions
|
||||||
|
|
||||||
Collection of Gitea friendly actions.
|
Collection of Gitea friendly actions & workflows
|
||||||
|
|
||||||
## Actions
|
|
||||||
|
|
||||||
- [release-git-tag](./release-git-tag//README.md)
|
|
||||||
- [release-helm-chart](./release-helm-chart/README.md)
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# release-git-tag
|
|
||||||
|
|
||||||
Creates and pushes a Git tag to the remote repository.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: ./release-git-tag
|
|
||||||
with:
|
|
||||||
tag: v1.0.0
|
|
||||||
```
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
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 }}
|
|
||||||
@@ -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 }}
|
|
||||||
```
|
|
||||||
@@ -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
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"local>t.behrendt/renovate-configs:common",
|
|
||||||
"local>t.behrendt/renovate-configs:action"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user