Release #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version (e.g. 1.2.3)' | |
| required: true | |
| type: string | |
| changelog: | |
| description: 'Changelog for this release (optional - will auto-generate if not provided)' | |
| required: false | |
| type: string | |
| jobs: | |
| build-and-release: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: linux/amd64 | |
| runner: ubuntu-latest | |
| arch: amd64 | |
| - platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch full history for changelog generation | |
| - name: Generate changelog (amd64 only) | |
| if: matrix.arch == 'amd64' | |
| id: changelog | |
| run: | | |
| # Make the script executable | |
| chmod +x scripts/generate-changelog.sh | |
| # Extract human-friendly changelog from CHANGELOG.md | |
| if [ -n "${{ github.event.inputs.changelog }}" ]; then | |
| echo "Using provided changelog" | |
| HUMAN_CHANGELOG="${{ github.event.inputs.changelog }}" | |
| else | |
| echo "Extracting changelog from CHANGELOG.md" | |
| # Extract the unreleased content from CHANGELOG.md | |
| HUMAN_CHANGELOG=$(awk ' | |
| /^## \[Unreleased\]/{in_unreleased=1; next} | |
| /^## \[/{if(in_unreleased) exit} | |
| in_unreleased && /^$/{print; next} | |
| in_unreleased && /^### /{current_section=$0; print; next} | |
| in_unreleased && /^[^#]/{print} | |
| ' CHANGELOG.md) | |
| # If no unreleased content found, use a default message | |
| if [ -z "$HUMAN_CHANGELOG" ]; then | |
| HUMAN_CHANGELOG="### Added | |
| ### Changed | |
| ### Fixed" | |
| fi | |
| fi | |
| # Generate raw commit list using the script | |
| echo "Generating raw commit list" | |
| RAW_COMMITS=$(NO_COLOR=1 ./scripts/generate-changelog.sh | sed 's/\x1b\[[0-9;]*m//g') | |
| # Combine both changelogs | |
| COMBINED_CHANGELOG="$HUMAN_CHANGELOG | |
| ## Raw Commit List | |
| $RAW_COMMITS" | |
| # Save changelog to output and file | |
| echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
| echo "$COMBINED_CHANGELOG" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| # Also save to a file for artifact | |
| echo "$COMBINED_CHANGELOG" > changelog.txt | |
| - name: Upload changelog artifact (amd64 only) | |
| if: matrix.arch == 'amd64' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: changelog | |
| path: changelog.txt | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Set up Git user | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Update version in package.json (web) | |
| run: | | |
| npm version ${{ github.event.inputs.version }} --no-git-tag-version | |
| working-directory: ./apps/web | |
| - name: Update version in go files (server) | |
| run: | | |
| sed -i.bak -E 's/(Version[[:space:]]*=[[:space:]]*")[^"]+(")/\1${{ github.event.inputs.version }}\2/' version.go | |
| rm version.go.bak | |
| working-directory: ./apps/server/src/version | |
| - name: Write version.ts for web | |
| run: | | |
| echo "// This file is auto-generated by the release workflow" > src/version.ts | |
| echo "export const VERSION = \"${{ github.event.inputs.version }}\";" >> src/version.ts | |
| working-directory: ./apps/web | |
| - name: Build and push UI image | |
| id: build_ui | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./apps/web/Dockerfile | |
| push: true | |
| platforms: ${{ matrix.platform }} | |
| provenance: false | |
| sbom: false | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:latest-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:latest-${{ matrix.arch }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push Server image | |
| id: build_server | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./apps/server | |
| push: true | |
| platforms: ${{ matrix.platform }} | |
| provenance: false | |
| sbom: false | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:latest-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:latest-${{ matrix.arch }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push Migrate image | |
| id: build_migrate | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./apps/server | |
| file: ./apps/server/Dockerfile.migrate | |
| push: true | |
| platforms: ${{ matrix.platform }} | |
| provenance: false | |
| sbom: false | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:latest-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:latest-${{ matrix.arch }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Update CHANGELOG.md (amd64 only) | |
| if: matrix.arch == 'amd64' | |
| run: | | |
| # Get current date | |
| RELEASE_DATE=$(date +"%Y-%m-%d") | |
| if [ ! -f CHANGELOG.md ]; then | |
| echo "❌ CHANGELOG.md not found!" | |
| exit 1 | |
| fi | |
| echo "Reading existing CHANGELOG.md..." | |
| # Extract the unreleased content from the current changelog | |
| UNRELEASED_CONTENT=$(awk ' | |
| /^## \[Unreleased\]/{in_unreleased=1; next} | |
| /^## \[/{if(in_unreleased) exit} | |
| in_unreleased && /^$/{print; next} | |
| in_unreleased && /^### /{current_section=$0; print; next} | |
| in_unreleased && /^[^#]/{print} | |
| ' CHANGELOG.md) | |
| echo "Moving unreleased content to version ${{ github.event.inputs.version }}" | |
| # Create a temporary file for the new changelog | |
| cat > temp_changelog.md << 'EOF' | |
| # Changelog | |
| All notable changes to this project will be documented in this file. | |
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | |
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | |
| ## [Unreleased] | |
| ### Added | |
| ### Changed | |
| ### Fixed | |
| EOF | |
| # Add the version section header | |
| echo "## [${{ github.event.inputs.version }}] - $RELEASE_DATE" >> temp_changelog.md | |
| # Add the unreleased content to the new version section | |
| if [ -n "$UNRELEASED_CONTENT" ]; then | |
| echo "$UNRELEASED_CONTENT" >> temp_changelog.md | |
| fi | |
| echo "" >> temp_changelog.md | |
| # If there's an existing CHANGELOG.md, append the old release content | |
| if [ -f CHANGELOG.md ]; then | |
| # Extract everything after the first release section from the old changelog | |
| sed -n '/^## \[[0-9]/,$p' CHANGELOG.md >> temp_changelog.md | |
| fi | |
| # Replace the old changelog | |
| mv temp_changelog.md CHANGELOG.md | |
| - name: Commit and tag version bump (amd64 only) | |
| if: matrix.arch == 'amd64' | |
| run: | | |
| git add apps/web/package.json apps/web/src/version.ts apps/server/src/version/version.go CHANGELOG.md | |
| git commit -m "chore: bump version to ${{ github.event.inputs.version }} and update changelog" | |
| git push origin HEAD:${{ github.ref_name }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-bundle-containers: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: linux/amd64 | |
| runner: ubuntu-latest | |
| arch: amd64 | |
| database: sqlite | |
| - platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| database: sqlite | |
| - platform: linux/amd64 | |
| runner: ubuntu-latest | |
| arch: amd64 | |
| database: mongo | |
| - platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| database: mongo | |
| - platform: linux/amd64 | |
| runner: ubuntu-latest | |
| arch: amd64 | |
| database: postgres | |
| - platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| database: postgres | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Update version in package.json (web) | |
| run: | | |
| npm version ${{ github.event.inputs.version }} --no-git-tag-version | |
| working-directory: ./apps/web | |
| - name: Update version in go files (server) | |
| run: | | |
| sed -i.bak -E 's/(Version[[:space:]]*=[[:space:]]*")[^"]+(")/\1${{ github.event.inputs.version }}\2/' version.go | |
| rm version.go.bak | |
| working-directory: ./apps/server/src/version | |
| - name: Write version.ts for web | |
| run: | | |
| echo "// This file is auto-generated by the release workflow" > src/version.ts | |
| echo "export const VERSION = \"${{ github.event.inputs.version }}\";" >> src/version.ts | |
| working-directory: ./apps/web | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push Bundle image - ${{ matrix.database }} | |
| id: build_bundle | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile.bundle.${{ matrix.database }} | |
| push: true | |
| platforms: ${{ matrix.platform }} | |
| provenance: false | |
| sbom: false | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${{ matrix.database }}:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${{ matrix.database }}:latest-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${{ matrix.database }}:${{ github.event.inputs.version }}-${{ matrix.arch }} | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${{ matrix.database }}:latest-${{ matrix.arch }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| create-manifest: | |
| runs-on: ubuntu-latest | |
| needs: [build-and-release, build-bundle-containers] | |
| steps: | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Create and push multi-arch manifests for GHCR | |
| run: | | |
| # UI manifest - versioned | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }} \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }} | |
| # UI manifest - latest | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:latest \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:latest-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:latest-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:latest | |
| # Server manifest - versioned | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }} \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }} | |
| # Server manifest - latest | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:latest \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:latest-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:latest-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:latest | |
| # Migrate manifest - versioned | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }} \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }} | |
| # Migrate manifest - latest | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:latest \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:latest-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:latest-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:latest | |
| # Bundle manifests | |
| for db in sqlite mongo postgres; do | |
| # Bundle manifest for each database - versioned | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }} \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }}-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }} | |
| # Bundle manifest for each database - latest | |
| docker manifest create --amend ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:latest \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:latest-amd64 \ | |
| ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:latest-arm64 | |
| docker manifest push ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-${db}:latest | |
| done | |
| - name: Create and push multi-arch manifests for Docker Hub | |
| run: | | |
| # UI manifest - versioned | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }} \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }} | |
| # UI manifest - latest | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:latest \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:latest-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:latest-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:latest | |
| # Server manifest - versioned | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }} \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }} | |
| # Server manifest - latest | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:latest \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:latest-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:latest-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:latest | |
| # Migrate manifest - versioned | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }} \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }} | |
| # Migrate manifest - latest | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:latest \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:latest-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:latest-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:latest | |
| # Bundle manifests | |
| for db in sqlite mongo postgres; do | |
| # Bundle manifest for each database - versioned | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }} \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }}-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }}-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:${{ github.event.inputs.version }} | |
| # Bundle manifest for each database - latest | |
| docker manifest create --amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:latest \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:latest-amd64 \ | |
| ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:latest-arm64 | |
| docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-${db}:latest | |
| done | |
| playwright-tests: | |
| needs: create-manifest | |
| uses: ./.github/workflows/playwright-reusable.yml | |
| with: | |
| container-tag: ${{ github.event.inputs.version }} | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: playwright-tests | |
| steps: | |
| - name: Download changelog artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: changelog | |
| path: . | |
| - name: Read changelog | |
| id: read_changelog | |
| run: | | |
| if [ -f changelog.txt ]; then | |
| echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
| cat changelog.txt >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| else | |
| echo "changelog=${{ github.event.inputs.changelog }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.event.inputs.version }} | |
| body: | | |
| ${{ steps.read_changelog.outputs.changelog }} | |
| ## Docker Images | |
| ### GitHub Container Registry (GHCR) | |
| - UI: `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}` / `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-web:latest` | |
| - Server: `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}` / `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-server:latest` | |
| - Migrate: `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}` / `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-migrate:latest` | |
| ### Bundle Containers (GHCR) | |
| - SQLite Bundle: `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-sqlite:${{ github.event.inputs.version }}` / `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-sqlite:latest` | |
| - MongoDB Bundle: `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-mongo:${{ github.event.inputs.version }}` / `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-mongo:latest` | |
| - PostgreSQL Bundle: `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-postgres:${{ github.event.inputs.version }}` / `ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-bundle-postgres:latest` | |
| ### Docker Hub | |
| - UI: `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:${{ github.event.inputs.version }}` / `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-web:latest` | |
| - Server: `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:${{ github.event.inputs.version }}` / `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-server:latest` | |
| - Migrate: `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:${{ github.event.inputs.version }}` / `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-migrate:latest` | |
| ### Bundle Containers (Docker Hub) | |
| - SQLite Bundle: `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-sqlite:${{ github.event.inputs.version }}` / `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-sqlite:latest` | |
| - MongoDB Bundle: `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-mongo:${{ github.event.inputs.version }}` / `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-mongo:latest` | |
| - PostgreSQL Bundle: `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-postgres:${{ github.event.inputs.version }}` / `${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-bundle-postgres:latest` | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-demo: | |
| needs: release | |
| uses: ./.github/workflows/deploy-demo.yml | |
| with: | |
| version: ${{ github.event.inputs.version }} | |
| secrets: inherit |