ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
ci: add ServerKit release workflow on push to main
Juan Denisbb30b2b4be66
diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.ymlindex dfa5edd5..8eddb2c0 100644--- a/.github/workflows/backend-ci.yml+++ b/.github/workflows/backend-ci.yml@@ -16,6 +16,7 @@ on:paths:- 'backend/**'- '.github/workflows/backend-ci.yml'+ workflow_call:jobs:pytest:diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlnew file mode 100644index 00000000..46d9a49d--- /dev/null+++ b/.github/workflows/release.yml@@ -0,0 +1,191 @@+name: Release++on:+ push:+ branches:+ - main+ tags:+ - 'v*'+ workflow_dispatch:+ inputs:+ version:+ description: 'Version to release (e.g., 1.6.24)'+ required: true+ type: string+ prerelease:+ description: 'Mark as pre-release'+ type: boolean+ default: false++concurrency:+ group: release-${{ github.ref }}+ cancel-in-progress: false++permissions:+ contents: write++env:+ DOCKER_IMAGE: jhd3197/serverkit++jobs:+ ci-gate:+ name: CI Gate+ uses: ./.github/workflows/backend-ci.yml++ version:+ name: Resolve Version+ runs-on: ubuntu-latest+ needs: ci-gate+ outputs:+ version: ${{ steps.version.outputs.version }}+ tag: ${{ steps.version.outputs.tag }}+ steps:+ - name: Checkout+ uses: actions/checkout@v4+ with:+ fetch-depth: 0++ - name: Get version+ id: version+ run: |+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ VERSION="${{ github.event.inputs.version }}"+ elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref_type }}" = "tag" ]; then+ VERSION="${GITHUB_REF#refs/tags/v}"+ else+ VERSION=$(cat VERSION | tr -d '[:space:]')+ fi+ TAG="v$VERSION"+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"+ echo "tag=$TAG" >> "$GITHUB_OUTPUT"+ echo "Releasing ServerKit version: $VERSION"++ - name: Create and push tag+ if: github.event_name == 'push' && github.ref_type != 'tag'+ run: |+ TAG="${{ steps.version.outputs.tag }}"+ if git rev-parse "$TAG" >/dev/null 2>&1; then+ echo "Tag $TAG already exists, skipping"+ else+ git config user.name "github-actions[bot]"+ git config user.email "github-actions[bot]@users.noreply.github.com"+ git tag -a "$TAG" -m "Release $TAG"+ git push origin "$TAG"+ fi++ build-docker:+ name: Build Docker Image+ runs-on: ubuntu-latest+ needs: version++ steps:+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Set up QEMU+ uses: docker/setup-qemu-action@v3++ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@v3++ - name: Login to Docker Hub+ uses: docker/login-action@v3+ with:+ username: ${{ secrets.DOCKERHUB_USERNAME }}+ password: ${{ secrets.DOCKERHUB_TOKEN }}+ continue-on-error: true++ - name: Build and push Docker image+ uses: docker/build-push-action@v5+ with:+ context: .+ platforms: linux/amd64,linux/arm64+ push: ${{ secrets.DOCKERHUB_USERNAME != '' }}+ tags: |+ ${{ env.DOCKER_IMAGE }}:latest+ ${{ env.DOCKER_IMAGE }}:${{ needs.version.outputs.version }}+ build-args: |+ VERSION=${{ needs.version.outputs.version }}+ BUILD_TIME=${{ github.event.repository.updated_at }}+ GIT_COMMIT=${{ github.sha }}++ release:+ name: Create Release+ runs-on: ubuntu-latest+ needs: [version, build-docker]+ permissions:+ contents: write++ steps:+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Generate checksums for tracked release files+ run: |+ mkdir -p release+ cp VERSION release/VERSION+ cp docker-compose.yml release/docker-compose.yml+ cp Dockerfile release/Dockerfile+ cd release+ sha256sum * > checksums.txt+ cat checksums.txt++ - name: Create GitHub Release+ uses: softprops/action-gh-release@v2+ with:+ tag_name: ${{ needs.version.outputs.tag }}+ name: ServerKit ${{ needs.version.outputs.tag }}+ draft: false+ prerelease: ${{ github.event.inputs.prerelease == 'true' }}+ files: |+ release/*+ body: |+ ## ServerKit ${{ needs.version.outputs.tag }}++ ServerKit is a server control panel for managing web applications, databases, Docker containers, and security on VPS/dedicated servers.++ ### Docker++ ```bash+ docker pull ${{ env.DOCKER_IMAGE }}:${{ needs.version.outputs.version }}+ docker pull ${{ env.DOCKER_IMAGE }}:latest+ ```++ ### Quick Start++ ```bash+ git clone https://github.com/${{ github.repository }}.git+ cd ServerKit+ docker compose up -d+ ```++ Default credentials: `admin` / `admin`++ ### What's New++ See [CHANGELOG](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}++ summary:+ name: Release Summary+ runs-on: ubuntu-latest+ needs: [version, release]++ steps:+ - name: Create summary+ run: |+ echo "## ServerKit Release Summary" >> $GITHUB_STEP_SUMMARY+ echo "" >> $GITHUB_STEP_SUMMARY+ echo "**Version:** ${{ needs.version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY+ echo "" >> $GITHUB_STEP_SUMMARY+ echo "### Docker" >> $GITHUB_STEP_SUMMARY+ echo "" >> $GITHUB_STEP_SUMMARY+ echo "| Tag | Image |" >> $GITHUB_STEP_SUMMARY+ echo "|-----|-------|" >> $GITHUB_STEP_SUMMARY+ echo "| latest | ${{ env.DOCKER_IMAGE }}:latest |" >> $GITHUB_STEP_SUMMARY+ echo "| ${{ needs.version.outputs.version }} | ${{ env.DOCKER_IMAGE }}:${{ needs.version.outputs.version }} |" >> $GITHUB_STEP_SUMMARY+ echo "" >> $GITHUB_STEP_SUMMARY+ echo "### Release" >> $GITHUB_STEP_SUMMARY+ echo "" >> $GITHUB_STEP_SUMMARY+ echo "Release created at: https://github.com/${{ github.repository }}/releases/tag/${{ needs.version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY