7 Commits

Author SHA1 Message Date
6bc2a8e585 Add renovate.json
Some checks failed
Docker Build (PR) / Build Docker image (pull_request) Failing after 54s
2025-11-27 17:31:47 +00:00
ebdcf45f1c Merge pull request 'fix: always compute repo name [skip-ci] [release-patch]' (#24) from dev into main
Reviewed-on: #24
2025-11-19 19:11:34 +00:00
f76a8d2efc fix: always compute repo name
All checks were successful
Docker Build (PR) / Build Docker image (pull_request) Has been skipped
/ build (pull_request) Successful in 25m38s
2025-11-19 20:11:04 +01:00
c57ad0f355 Merge pull request 'style fix: add no cache option [skip-ci] [release-patch]' (#23) from dev into main
Reviewed-on: #23
2025-11-19 18:40:51 +00:00
51f5aefcaa fix: add no cache option
Some checks failed
Docker Build (PR) / Build Docker image (pull_request) Has been skipped
/ build (pull_request) Has been cancelled
2025-11-19 19:39:31 +01:00
febd0e8369 Merge pull request 'feat: update release workflow to auto create release based on PR [skip-ci]' (#22) from dev into main
Reviewed-on: #22
2025-11-19 18:25:56 +00:00
5c4a2a8ffc feat: update release workflow to auto create release based on PR
All checks were successful
Docker Build (PR) / Build Docker image (pull_request) Has been skipped
/ build (pull_request) Has been skipped
2025-11-19 19:24:55 +01:00
2 changed files with 36 additions and 5 deletions

View File

@@ -18,12 +18,39 @@ on:
- "major"
- "minor"
- "patch"
pull_request:
types: [closed]
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
# Only run on merged PRs with [release-*] or manual workflow_dispatch
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.event.pull_request.merged == true && contains(github.event.pull_request.title, '[release-'))
steps:
- name: Determine bump type
id: bump_type
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "type=${{ github.event.inputs.bump }}" >> $GITHUB_OUTPUT
else
# Extract bump type from PR title: [release-patch], [release-minor], [release-major]
PR_TITLE="${{ github.event.pull_request.title }}"
if [[ "$PR_TITLE" =~ \[release-major\] ]]; then
echo "type=major" >> $GITHUB_OUTPUT
elif [[ "$PR_TITLE" =~ \[release-minor\] ]]; then
echo "type=minor" >> $GITHUB_OUTPUT
elif [[ "$PR_TITLE" =~ \[release-patch\] ]]; then
echo "type=patch" >> $GITHUB_OUTPUT
else
echo "type=patch" >> $GITHUB_OUTPUT
fi
fi
- name: Checkout code
uses: actions/checkout@v4.2.2
with:
@@ -52,7 +79,7 @@ jobs:
id: bump
run: |
uv tool install bump-my-version
uv tool run bump-my-version bump ${{ github.event.inputs.bump }}
uv tool run bump-my-version bump ${{ steps.bump_type.outputs.type }}
# echo the version to github env, the version is shown by using uv tool run bump-my-version show current_version
echo "VERSION<<EOF" >> $GITHUB_ENV
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
@@ -77,12 +104,12 @@ jobs:
echo "tag=$prev" >> "$GITHUB_OUTPUT"
- name: Compute lowercased image repo
if: ${{ github.event.inputs.docker_release == 'true' }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.docker_release == 'true' || github.event_name == 'pull_request' }}
run: |
echo "IMAGE_REPO=${{ secrets.REGISTRY }}/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Docker meta
if: ${{ github.event.inputs.docker_release == 'true' }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.docker_release == 'true' || github.event_name == 'pull_request' }}
id: meta
uses: docker/metadata-action@v5
with:
@@ -92,12 +119,13 @@ jobs:
type=raw,value=${{ env.VERSION }}
- name: Build and push Docker image
if: ${{ github.event.inputs.docker_release == 'true' }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.docker_release == 'true' || github.event_name == 'pull_request' }}
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
no-cache: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
@@ -118,7 +146,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
- name: Create Gitea Release
if: ${{ github.event.inputs.github_release == 'true' }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.github_release == 'true' || github.event_name == 'pull_request' }}
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.VERSION }}

3
renovate.json Normal file
View File

@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}