This commit is contained in:
48
.gitea/workflows/release.yaml
Normal file
48
.gitea/workflows/release.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/git
|
||||
|
||||
- name: Semantic Release
|
||||
id: semantic
|
||||
run: |
|
||||
npx semantic-release --branches main > semantic-release.log || true
|
||||
echo "RELEASE_VERSION=$(grep 'Published release' semantic-release.log | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.tools.ldpt.fr
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
if: env.RELEASE_VERSION != ''
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.tools.ldpt.fr/actions/helm-ci-image:${{ env.RELEASE_VERSION }}
|
||||
19
.releaserc.json
Normal file
19
.releaserc.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"branches": [
|
||||
{
|
||||
"name": "main"
|
||||
}
|
||||
],
|
||||
"tagFormat": "${version}",
|
||||
"plugins": [
|
||||
["@semantic-release/commit-analyzer"],
|
||||
["@semantic-release/release-notes-generator"],
|
||||
["@semantic-release/changelog", {
|
||||
"changelogFile": "CHANGELOG.md"
|
||||
}],
|
||||
["@semantic-release/git", {
|
||||
"assets": ["CHANGELOG.md"],
|
||||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||
}]
|
||||
]
|
||||
}
|
||||
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM alpine/helm:3.19.0
|
||||
RUN apk add --no-cache nodejs npm git bash curl ca-certificates \
|
||||
&& update-ca-certificates
|
||||
Reference in New Issue
Block a user