1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-10 07:55:27 +02:00

feat: Version 2

Closes #627, closes #1047
This commit is contained in:
Maksim Eltyshev 2025-05-10 02:09:06 +02:00
parent ad7fb51cfa
commit 2ee1166747
1557 changed files with 76832 additions and 47042 deletions

View file

@ -0,0 +1,52 @@
name: Build and Publish Release Package
on:
release:
types: [created]
jobs:
build-and-publish-release-package:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Update npm
run: npm install npm --global
- name: Install client dependencies
run: npm install --omit=dev
working-directory: ./client
- name: Build client
run: DISABLE_ESLINT_PLUGIN=true npm run build
working-directory: ./client
- name: Include server into dist
run: mv server dist
- name: Include built client into dist
run: |
mv dist/* ../dist/public
cp ../dist/public/index.html ../dist/views
working-directory: ./client
- name: Include LICENSE.md, README.md, SECURITY.md into dist
run: mv LICENSE.md README.md SECURITY.md dist
- name: Create release package
run: |
mv dist planka
zip -r planka-prebuild.zip planka
- name: Publish release package
run: gh release upload ${{ github.event.release.tag_name }} planka-prebuild.zip
env:
GH_TOKEN: ${{ github.token }}

View file

@ -1,44 +0,0 @@
name: Build and push Docker base image
on:
push:
paths:
- ./Dockerfile.base
branches:
- master
workflow_dispatch:
env:
ALPINE_VERSION: 3.16
jobs:
build-and-push-docker-base-image:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
file: Dockerfile.base
build-args: ALPINE_VERSION=${{ env.ALPINE_VERSION }}
push: true
tags: |
ghcr.io/${{ github.repository }}:base-latest
ghcr.io/${{ github.repository }}:base-${{ env.ALPINE_VERSION }}

View file

@ -1,4 +1,4 @@
name: Build and push Docker image
name: Build and Push Docker Image
on:
release:
@ -7,8 +7,9 @@ on:
jobs:
build-and-push-docker-image:
runs-on: self-hosted
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
@ -17,21 +18,21 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set version
- name: Set version from release tag
uses: actions/github-script@v6
id: set-version
with:
result-encoding: string
script: return context.payload.release.tag_name.replace('v', '')
- name: Generate docker image tags
- name: Generate Docker image tags
id: metadata
uses: docker/metadata-action@v5
with:
@ -39,9 +40,8 @@ jobs:
name=ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ steps.set-version.outputs.result }}
type=raw,value=latest
- name: Build and push
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .

View file

@ -1,23 +1,21 @@
# https://docs.docker.com/build/ci/github-actions/multi-platform/
name: Build and push Docker DEV image
name: Build and Push Docker Nightly Image
on:
push:
paths-ignore:
- '.github/**'
- 'charts/**'
- 'docker-*.sh'
- 'docker-*.yml'
- '*.md'
branches: [master]
workflow_dispatch:
env:
REGISTRY_IMAGE: ghcr.io/${{ github.repository }}
jobs:
build:
build-and-push-docker-nightly-image:
runs-on: self-hosted
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
@ -26,22 +24,23 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate docker image tags
- name: Generate Docker image tags
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
images: |
name=ghcr.io/${{ github.repository }}
tags: |
type=raw,value=dev
type=raw,value=nightly
- name: Build and push
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .

View file

@ -1,56 +0,0 @@
name: Build and publish release package
on:
release:
types: [created]
jobs:
build-and-publish-release-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Workflow install pnpm
run: npm install pnpm@9 -g
- name: Client install dependencies
run: pnpm install
- name: Server install dependencies
run: pnpm install
- name: Server include into dist
run: mv server/ dist/
- name: Client build production
run: |
npm run build
working-directory: ./client
- name: Client include into dist
run: |
mv build/index.html ../dist/views/index.ejs
mv build/* ../dist/public/
working-directory: ./client
- name: Dist include README.md SECURITY.md LICENSE start.sh
run: mv README.md SECURITY.md LICENSE start.sh dist/
- name: Dist Remove node modules
run: rm -R dist/node_modules
- name: Dist create .zip file
run: |
mv dist/ planka/
zip -r planka-prebuild.zip planka
- name: Dist upload assets
run: |
gh release upload ${{ github.event.release.tag_name }} planka-prebuild.zip
env:
GH_TOKEN: ${{ github.token }}

View file

@ -1,4 +1,4 @@
name: Build and test
name: Build and Test
on:
pull_request:
@ -9,23 +9,25 @@ on:
- master
jobs:
setup:
build-and-test:
runs-on: ubuntu-latest
env:
POSTGRES_DB: planka_db
POSTGRES_DB: planka
POSTGRES_USER: user
POSTGRES_PASSWORD: password
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '18'
cache: 'npm'
- name: Setup PostgreSQL
- name: Set up PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v5
with:
database: ${{ env.POSTGRES_DB }}
@ -40,13 +42,13 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
- name: Install dependencies and build client
run: |
npm install
cd client
npm run build
- name: Setup server
- name: Set up and start server for testing
env:
DEFAULT_ADMIN_EMAIL: demo@demo.demo
DEFAULT_ADMIN_PASSWORD: demo
@ -60,14 +62,13 @@ jobs:
npm run db:init
npm start --prod &
- name: Wait for development server
- name: Wait for server to start
run: |
sudo apt-get install wait-for-it -y
wait-for-it -h localhost -p 1337 -t 10
- name: Run UI tests
run: |
cd client
npm install
npx playwright install chromium
npm run test:acceptance tests
npm run test:acceptance
working-directory: ./client

View file

@ -6,16 +6,17 @@ on:
- master
jobs:
setup:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '18'
cache: 'npm'
- name: Cache Node.js modules

View file

@ -8,14 +8,16 @@ on:
- master
jobs:
release:
release-helm-chart:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: self-hosted
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
@ -28,13 +30,13 @@ jobs:
- name: Install Helm
uses: azure/setup-helm@v3
- name: Add repositories
- name: Add Helm chart repositories
run: |
for dir in $(ls -d charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Run chart-releaser for stable
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: charts