From 5dd855f01d28e177904323761445df340f75d2f0 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Feb 2022 17:05:21 -0500 Subject: [PATCH 01/42] ci: add build workflow --- .github/workflows/build.yml | 143 ++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..415bb653 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,143 @@ +name: Build + Publish + +on: + push: + branches: + - dev + tags: + - 'v*' + +env: + BASE_DEV_VERSION: 2.5.0 + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set Build Variables + run: | + if [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then + echo "Using TAG mode: $GITHUB_REF_NAME" + echo "REL_VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV + echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV + else + echo "Using BRANCH mode: v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" + echo "REL_VERSION=v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + echo "REL_VERSION_STRICT=$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + fi + + - name: Disable DEV Flag + Set Version + run: | + sudo apt-get install jq -y + mv package.json pkg-temp.json + jq -r '. + {dev:false, version:"$REL_VERSION_STRICT"}' pkg-temp.json > package.json + rm pkg-temp.json + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v2.9.0 + with: + context: . + file: dev/build/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + requarks/wiki:canary + requarks/wiki:canary-${{ env.REL_VERSION_STRICT }} + ghcr.io/requarks/wiki:canary + ghcr.io/requarks/wiki:canary-${{ env.REL_VERSION_STRICT }} + + - name: Extract compiled files + run: | + mkdir -p _dist + docker create --name wiki ghcr.io/requarks/wiki:canary-$REL_VERSION_STRICT + docker cp wiki:/wiki _dist + docker rm wiki + rm _dist/wiki/config.yml + cp ./config.sample.yml _dist/wiki/config.sample.yml + find _dist/wiki/ -printf "%P\n" | tar -czf wiki-js.tar.gz --no-recursion -C _dist/wiki/ -T - + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.3.1 + with: + name: drop + path: wiki-js.tar.gz + + cypress: + name: Run Cypress Tests + runs-on: ubuntu-latest + needs: [build] + + strategy: + matrix: + dbtype: [postgres, mysql, mariadb, mssql, sqlite] + + steps: + - uses: actions/checkout@v2 + + - name: Set Test Variables + run: | + if [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then + echo "Using TAG mode: $GITHUB_REF_NAME" + echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV + else + echo "Using BRANCH mode: v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" + echo "REL_VERSION_STRICT=$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + fi + + - name: Run Tests + env: + MATRIXENV: ${{ matrix.dbtype }} + CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }} + run: | + dev/cypress/ci-setup.sh + docker run --name cypress --ipc=host --shm-size 1G -v $GITHUB_WORKSPACE:/e2e -w /e2e cypress/included:4.9.0 --record --key "$(CYPRESS_KEY)" --headless --group "$MATRIXENV" --ci-build-id "$REL_VERSION_STRICT" --config baseUrl=http://172.17.0.1:3000 + + windows: + name: Windows Build + runs-on: windows-latest + needs: [build] + + steps: + - name: Setup Node.js environment + uses: actions/setup-node@v2.5.1 + with: + node-version: 12.x + + - name: Download a Build Artifact + uses: actions/download-artifact@v2.1.0 + with: + name: drop + path: drop + + - name: Extract Build + run: | + mkdir -p win + tar -xzf $env:GITHUB_WORKSPACE\drop\wiki-js.tar.gz -C $env:GITHUB_WORKSPACE\win --exclude=node_modules + + - name: Install Dependencies + run: yarn --production --frozen-lockfile --non-interactive + From 2e93b67ca978b36dcbbb0fdd91400c55f05cfc12 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Feb 2022 17:45:47 -0500 Subject: [PATCH 02/42] ci: improve build workflow --- .github/workflows/build.yml | 125 +++++++++++++++++++++++++----------- 1 file changed, 88 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 415bb653..7c19bb6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,48 +96,99 @@ jobs: dbtype: [postgres, mysql, mariadb, mssql, sqlite] steps: - - uses: actions/checkout@v2 - - - name: Set Test Variables - run: | - if [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then - echo "Using TAG mode: $GITHUB_REF_NAME" - echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV - else - echo "Using BRANCH mode: v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" - echo "REL_VERSION_STRICT=$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV - fi + - uses: actions/checkout@v2 + + - name: Set Test Variables + run: | + if [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then + echo "Using TAG mode: $GITHUB_REF_NAME" + echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV + else + echo "Using BRANCH mode: v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" + echo "REL_VERSION_STRICT=$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + fi + + - name: Run Tests + env: + MATRIXENV: ${{ matrix.dbtype }} + CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }} + run: | + dev/cypress/ci-setup.sh + docker run --name cypress --ipc=host --shm-size 1G -v $GITHUB_WORKSPACE:/e2e -w /e2e cypress/included:4.9.0 --record --key "$(CYPRESS_KEY)" --headless --group "$MATRIXENV" --ci-build-id "$REL_VERSION_STRICT" --config baseUrl=http://172.17.0.1:3000 + + arm: + name: ARM Build + runs-on: ubuntu-latest + needs: [cypress] + + steps: + - uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 - - name: Run Tests - env: - MATRIXENV: ${{ matrix.dbtype }} - CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }} - run: | - dev/cypress/ci-setup.sh - docker run --name cypress --ipc=host --shm-size 1G -v $GITHUB_WORKSPACE:/e2e -w /e2e cypress/included:4.9.0 --record --key "$(CYPRESS_KEY)" --headless --group "$MATRIXENV" --ci-build-id "$REL_VERSION_STRICT" --config baseUrl=http://172.17.0.1:3000 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Download a Build Artifact + uses: actions/download-artifact@v2.1.0 + with: + name: drop + path: drop + + - name: Extract Build + run: | + mkdir -p build + tar -xzf $GITHUB_WORKSPACE/drop/wiki-js.tar.gz -C $GITHUB_WORKSPACE/build --exclude=node_modules + + - name: Build and push Docker images + uses: docker/build-push-action@v2.9.0 + with: + context: . + file: dev/build-arm/Dockerfile + platforms: linux/arm64,linux/arm/v7 + push: true + tags: | + requarks/wiki:canary-arm + requarks/wiki:canary-arm-${{ env.REL_VERSION_STRICT }} + ghcr.io/requarks/wiki:canary-arm + ghcr.io/requarks/wiki:canary-arm-${{ env.REL_VERSION_STRICT }} windows: name: Windows Build runs-on: windows-latest - needs: [build] + needs: [cypress] steps: - - name: Setup Node.js environment - uses: actions/setup-node@v2.5.1 - with: - node-version: 12.x - - - name: Download a Build Artifact - uses: actions/download-artifact@v2.1.0 - with: - name: drop - path: drop - - - name: Extract Build - run: | - mkdir -p win - tar -xzf $env:GITHUB_WORKSPACE\drop\wiki-js.tar.gz -C $env:GITHUB_WORKSPACE\win --exclude=node_modules - - - name: Install Dependencies - run: yarn --production --frozen-lockfile --non-interactive + - name: Setup Node.js environment + uses: actions/setup-node@v2.5.1 + with: + node-version: 12.x + + - name: Download a Build Artifact + uses: actions/download-artifact@v2.1.0 + with: + name: drop + path: drop + + - name: Extract Build + run: | + mkdir -p win + tar -xzf $env:GITHUB_WORKSPACE\drop\wiki-js.tar.gz -C $env:GITHUB_WORKSPACE\win --exclude=node_modules + + - name: Install Dependencies + run: yarn --production --frozen-lockfile --non-interactive From 2a9d7d05afd38159174437bd5c27eaa77e09136c Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Feb 2022 17:48:42 -0500 Subject: [PATCH 03/42] ci: remove buildx from build main workflow --- .github/workflows/build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c19bb6f..2da2f264 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,12 +37,6 @@ jobs: mv package.json pkg-temp.json jq -r '. + {dev:false, version:"$REL_VERSION_STRICT"}' pkg-temp.json > package.json rm pkg-temp.json - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - name: Login to DockerHub uses: docker/login-action@v1 @@ -62,7 +56,6 @@ jobs: with: context: . file: dev/build/Dockerfile - platforms: linux/amd64,linux/arm64 push: true tags: | requarks/wiki:canary From c8f3a941b4a4069de8564aeae4d67faa68214397 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Feb 2022 18:15:16 -0500 Subject: [PATCH 04/42] ci: add packages permission to build workflow --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2da2f264..c1d182d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,8 @@ jobs: build: name: Build runs-on: ubuntu-latest + permissions: + packages: write steps: - uses: actions/checkout@v2 @@ -113,6 +115,8 @@ jobs: name: ARM Build runs-on: ubuntu-latest needs: [cypress] + permissions: + packages: write steps: - uses: actions/checkout@v2 From 6d4e5670e154e814d2971ed1468e29f41042daf0 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Feb 2022 18:37:32 -0500 Subject: [PATCH 05/42] ci: fix cypress script permission --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1d182d2..41dbc89c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,6 +108,7 @@ jobs: MATRIXENV: ${{ matrix.dbtype }} CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }} run: | + chmod u+x dev/cypress/ci-setup.sh dev/cypress/ci-setup.sh docker run --name cypress --ipc=host --shm-size 1G -v $GITHUB_WORKSPACE:/e2e -w /e2e cypress/included:4.9.0 --record --key "$(CYPRESS_KEY)" --headless --group "$MATRIXENV" --ci-build-id "$REL_VERSION_STRICT" --config baseUrl=http://172.17.0.1:3000 From 5250c64fbbc5cfdce69a088afddf7203b0d992c1 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Feb 2022 20:06:04 -0500 Subject: [PATCH 06/42] ci: replace cypress docker source --- dev/cypress/ci-setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/cypress/ci-setup.sh b/dev/cypress/ci-setup.sh index 0c9799f0..70b9c5f1 100644 --- a/dev/cypress/ci-setup.sh +++ b/dev/cypress/ci-setup.sh @@ -6,7 +6,7 @@ postgres) echo "Waiting for database connection..." sleep 2 done - docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=postgres" -e "DB_HOST=localhost" -e "DB_PORT=5432" -e "DB_NAME=wiki" -e "DB_USER=wiki" -e "DB_PASS=Password123!" requarks/wiki:canary-$BUILD_BUILDNUMBER + docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=postgres" -e "DB_HOST=localhost" -e "DB_PORT=5432" -e "DB_NAME=wiki" -e "DB_USER=wiki" -e "DB_PASS=Password123!" requarks/wiki:canary-$REL_VERSION_STRICT ;; mysql) echo "Using MySQL..." @@ -15,7 +15,7 @@ mysql) echo "Waiting for database connection..." sleep 2 done - docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=mysql" -e "DB_HOST=localhost" -e "DB_PORT=3306" -e "DB_NAME=wiki" -e "DB_USER=wiki" -e "DB_PASS=Password123!" requarks/wiki:canary-$BUILD_BUILDNUMBER + docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=mysql" -e "DB_HOST=localhost" -e "DB_PORT=3306" -e "DB_NAME=wiki" -e "DB_USER=wiki" -e "DB_PASS=Password123!" requarks/wiki:canary-$REL_VERSION_STRICT ;; mariadb) echo "Using MariaDB..." @@ -24,7 +24,7 @@ mariadb) echo "Waiting for database connection..." sleep 2 done - docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=mariadb" -e "DB_HOST=localhost" -e "DB_PORT=3306" -e "DB_NAME=wiki" -e "DB_USER=wiki" -e "DB_PASS=Password123!" requarks/wiki:canary-$BUILD_BUILDNUMBER + docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=mariadb" -e "DB_HOST=localhost" -e "DB_PORT=3306" -e "DB_NAME=wiki" -e "DB_USER=wiki" -e "DB_PASS=Password123!" requarks/wiki:canary-$REL_VERSION_STRICT ;; mssql) echo "Using MS SQL Server..." @@ -33,11 +33,11 @@ mssql) echo "Waiting for database connection..." sleep 2 done - docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=mssql" -e "DB_HOST=localhost" -e "DB_PORT=1433" -e "DB_NAME=wiki" -e "DB_USER=SA" -e "DB_PASS=Password123!" requarks/wiki:canary-$BUILD_BUILDNUMBER + docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=mssql" -e "DB_HOST=localhost" -e "DB_PORT=1433" -e "DB_NAME=wiki" -e "DB_USER=SA" -e "DB_PASS=Password123!" requarks/wiki:canary-$REL_VERSION_STRICT ;; sqlite) echo "Using SQLite..." - docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=sqlite" -e "DB_FILEPATH=db.sqlite" requarks/wiki:canary-$BUILD_BUILDNUMBER + docker run -d -p 3000:3000 --name wiki --network="host" -e "DB_TYPE=sqlite" -e "DB_FILEPATH=db.sqlite" requarks/wiki:canary-$REL_VERSION_STRICT ;; *) echo "Invalid DB Type!" From e4cb2a36f95188283092e44dd968c1cd9a04d9b9 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 3 Feb 2022 23:44:13 -0500 Subject: [PATCH 07/42] ci: fix cypress key arg --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41dbc89c..569ac50b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,7 +110,7 @@ jobs: run: | chmod u+x dev/cypress/ci-setup.sh dev/cypress/ci-setup.sh - docker run --name cypress --ipc=host --shm-size 1G -v $GITHUB_WORKSPACE:/e2e -w /e2e cypress/included:4.9.0 --record --key "$(CYPRESS_KEY)" --headless --group "$MATRIXENV" --ci-build-id "$REL_VERSION_STRICT" --config baseUrl=http://172.17.0.1:3000 + docker run --name cypress --ipc=host --shm-size 1G -v $GITHUB_WORKSPACE:/e2e -w /e2e cypress/included:4.9.0 --record --key "$CYPRESS_KEY" --headless --group "$MATRIXENV" --ci-build-id "$REL_VERSION_STRICT" --config baseUrl=http://172.17.0.1:3000 arm: name: ARM Build From 4e410078d244844fd6258ec79135f4953eabd28f Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 4 Feb 2022 00:31:39 -0500 Subject: [PATCH 08/42] ci: add beta + release workflows --- .github/workflows/build.yml | 139 ++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 569ac50b..6ae83004 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,6 +122,16 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set Version Variables + run: | + if [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then + echo "Using TAG mode: $GITHUB_REF_NAME" + echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV + else + echo "Using BRANCH mode: v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" + echo "REL_VERSION_STRICT=$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + fi + - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -189,4 +199,133 @@ jobs: - name: Install Dependencies run: yarn --production --frozen-lockfile --non-interactive + working-directory: win + + - name: Create Bundle + run: tar -czf wiki-js-windows.tar.gz -C $env:GITHUB_WORKSPACE\win . + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.3.1 + with: + name: drop-win + path: wiki-js-windows.tar.gz + + beta: + name: Publish Beta Images + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + needs: [build, arm, windows] + permissions: + packages: write + + steps: + - name: Set Version Variables + run: | + if [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then + echo "Using TAG mode: $GITHUB_REF_NAME" + echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV + else + echo "Using BRANCH mode: v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" + echo "REL_VERSION_STRICT=$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + fi + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Tag Images + run: | + docker pull ghcr.io/requarks/wiki:canary-$REL_VERSION_STRICT + docker pull ghcr.io/requarks/wiki:canary-arm-$REL_VERSION_STRICT + + echo "Creating the manifests..." + + docker manifest create requarks/wiki:beta-$REL_VERSION_STRICT ghcr.io/requarks/wiki:canary-$REL_VERSION_STRICT ghcr.io/requarks/wiki:canary-arm-$REL_VERSION_STRICT + docker manifest create requarks/wiki:beta ghcr.io/requarks/wiki:canary-$REL_VERSION_STRICT ghcr.io/requarks/wiki:canary-arm-$REL_VERSION_STRICT + docker manifest create ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT ghcr.io/requarks/wiki:canary-$REL_VERSION_STRICT ghcr.io/requarks/wiki:canary-arm-$REL_VERSION_STRICT + docker manifest create ghcr.io/requarks/wiki:beta ghcr.io/requarks/wiki:canary-$REL_VERSION_STRICT ghcr.io/requarks/wiki:canary-arm-$REL_VERSION_STRICT + + echo "Pushing the manifests..." + + docker manifest push -p requarks/wiki:beta-$REL_VERSION_STRICT + docker manifest push -p requarks/wiki:beta + docker manifest push -p ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT + docker manifest push -p ghcr.io/requarks/wiki:beta + + release: + name: Publish Release Images + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + environment: prod + needs: [beta] + permissions: + packages: write + + steps: + - name: Set Version Variables + run: | + if [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then + echo "Using TAG mode: $GITHUB_REF_NAME" + echo "REL_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV + else + echo "Using BRANCH mode: v$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" + echo "REL_VERSION_STRICT=$BASE_DEV_VERSION-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + fi + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Tag Images + run: | + docker pull ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT + + echo "Fetching semver tool..." + curl -LJO https://static.requarks.io/semver + chmod +x semver + + MAJOR=`./semver get major $REL_VERSION_STRICT` + MINOR=`./semver get minor $REL_VERSION_STRICT` + MAJORMINOR="$MAJOR.$MINOR" + + echo "Using major $MAJOR and minor $MINOR..." + echo "Tagging images..." + + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT requarks/wiki:$REL_VERSION_STRICT + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT requarks/wiki:$MAJOR + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT requarks/wiki:$MAJORMINOR + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT requarks/wiki:latest + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT ghcr.io/requarks/wiki:$REL_VERSION_STRICT + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT ghcr.io/requarks/wiki:$MAJOR + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT ghcr.io/requarks/wiki:$MAJORMINOR + docker tag ghcr.io/requarks/wiki:beta-$REL_VERSION_STRICT ghcr.io/requarks/wiki:latest + + echo "Pushing images..." + + docker push requarks/wiki:$REL_VERSION_STRICT + docker push requarks/wiki:$MAJOR + docker push requarks/wiki:$MAJORMINOR + docker push requarks/wiki:latest + docker push ghcr.io/requarks/wiki:$REL_VERSION_STRICT + docker push ghcr.io/requarks/wiki:$MAJOR + docker push ghcr.io/requarks/wiki:$MAJORMINOR + docker push ghcr.io/requarks/wiki:latest From b0852ac1076618dd8eeac92be1a2d490a50b7ea0 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 4 Feb 2022 00:37:52 -0500 Subject: [PATCH 09/42] docs: use gh workflow status badge [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e81f6b6..9bf07ded 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Backers on Open Collective](https://opencollective.com/wikijs/all/badge.svg)](https://opencollective.com/wikijs) [![Downloads](https://img.shields.io/github/downloads/Requarks/wiki/total.svg?style=flat&logo=github)](https://github.com/Requarks/wiki/releases) [![Docker Pulls](https://img.shields.io/docker/pulls/requarks/wiki.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/requarks/wiki/) -[![Build status](https://dev.azure.com/requarks/wiki/_apis/build/status/build)](https://dev.azure.com/requarks/wiki/_build/latest?definitionId=9) +[![Build + Publish](https://github.com/Requarks/wiki/actions/workflows/build.yml/badge.svg)](https://github.com/Requarks/wiki/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=wiki&metric=alert_status)](https://sonarcloud.io/dashboard?id=wiki) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=wiki&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=wiki) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=wiki&metric=security_rating)](https://sonarcloud.io/dashboard?id=wiki) From 8d420759f886b344cb1d212e7a03b8ceac44ddbb Mon Sep 17 00:00:00 2001 From: Jordan JEAN Date: Sat, 5 Feb 2022 04:47:14 +0100 Subject: [PATCH 10/42] chore(helm): add volumes and volumeMounts chart values (#4714) --- dev/helm/README.md | 2 ++ dev/helm/templates/deployment.yaml | 8 ++++++++ dev/helm/values.yaml | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/dev/helm/README.md b/dev/helm/README.md index e6f506c9..5f9b9618 100644 --- a/dev/helm/README.md +++ b/dev/helm/README.md @@ -104,6 +104,8 @@ The following table lists the configurable parameters of the Wiki.js chart and t | `affinity` | Affinity settings for wiki.js pod assignment | `{}` | | `schedulerName` | Name of an alternate scheduler for wiki.js pod | `nil` | | `tolerations` | Toleration labels for wiki.jsk pod assignment | `[]` | +| `volumeMounts` | Volume mounts for Wiki.js container | `[]` | +| `volumes` | Volumes for Wiki.js Pod | `[]` | | `ingress.enabled` | Enable ingress controller resource | `false` | | `ingress.annotations` | Ingress annotations | `{}` | | `ingress.hosts` | List of ingress rules | `[{"host": "wiki.local", "paths": ["/"]}]` | diff --git a/dev/helm/templates/deployment.yaml b/dev/helm/templates/deployment.yaml index c26e9299..4e8cec52 100644 --- a/dev/helm/templates/deployment.yaml +++ b/dev/helm/templates/deployment.yaml @@ -63,6 +63,10 @@ spec: key: {{ template "wiki.postgresql.secretKey" . }} - name: HA_ACTIVE value: {{ .Values.replicaCount | int | le 2 | quote }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} ports: - name: http containerPort: 3000 @@ -85,3 +89,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/dev/helm/values.yaml b/dev/helm/values.yaml index 41da889e..a1ed353e 100644 --- a/dev/helm/values.yaml +++ b/dev/helm/values.yaml @@ -85,6 +85,10 @@ tolerations: [] affinity: {} +volumeMounts: [] + +volumes: [] + # This will allow us to install locales even without internet access using a initContainer & wikjs "sideloading" sideload: enabled: false From dab99ff537d464ef405cf92910e6a2bbcfcd6de4 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 4 Feb 2022 22:52:52 -0500 Subject: [PATCH 11/42] ci: point to updated branch [skip ci] --- .github/workflows/build.yml | 2 +- .github/workflows/helm.yml | 2 +- azure-pipelines.yml | 158 ------------------------------------ 3 files changed, 2 insertions(+), 160 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ae83004..4d778e1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: Build + Publish on: push: branches: - - dev + - main tags: - 'v*' diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 5d7bec69..5c27af1e 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -3,7 +3,7 @@ name: Helm Chart CI on: # Triggers the workflow on push or pull request events but only for the dev branch push: - branches: [ dev ] + branches: [ main ] paths: [ dev/helm/** ] # Allows you to run this workflow manually from the Actions tab diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 8f4fdb75..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,158 +0,0 @@ -name: 2.6.$(Rev:r) - -trigger: -- dev -- latest - -stages: -- stage: build - displayName: Build stage - jobs: - - # ------------------------------- - # BUILD - LINUX - # ------------------------------- - - - job: buildLinux - displayName: Linux Build - timeoutInMinutes: 60 - cancelTimeoutInMinutes: 1 - pool: - name: Azure Pipelines - vmImage: ubuntu-latest - steps: - - task: CmdLine@2 - displayName: Disable dev flag - inputs: - script: | - sudo apt-get install jq -y - mv package.json pkg-temp.json - jq -r '.dev |= false' pkg-temp.json > package.json - rm pkg-temp.json - workingDirectory: '$(Build.SourcesDirectory)' - - - task: CmdLine@2 - displayName: Set Package Version - inputs: - script: | - mv package.json pkg-temp.json - jq -r '.version |= "$(Build.BuildNumber)"' pkg-temp.json > package.json - rm pkg-temp.json - cat package.json - workingDirectory: '$(Build.SourcesDirectory)' - - - task: Docker@2 - displayName: Build Docker image - inputs: - containerRegistry: Docker Hub - repository: requarks/wiki - Dockerfile: dev/build/Dockerfile - buildContext: '$(System.DefaultWorkingDirectory)' - tags: | - canary - canary-$(Build.BuildNumber) - addPipelineData: false - - - task: CmdLine@2 - displayName: Extract compiled files - inputs: - script: | - docker create --name wiki requarks/wiki:canary - docker cp wiki:/wiki $(Build.StagingDirectory) - docker rm wiki - rm $(Build.StagingDirectory)/wiki/config.yml - cp $(System.DefaultWorkingDirectory)/config.sample.yml $(Build.StagingDirectory)/wiki/config.sample.yml - find $(Build.StagingDirectory)/wiki/ -printf "%P\n" | tar -czf wiki-js.tar.gz --no-recursion -C $(Build.StagingDirectory)/wiki/ -T - - workingDirectory: '$(Build.SourcesDirectory)' - - - task: PublishBuildArtifacts@1 - displayName: Publish Build Artifacts - inputs: - PathtoPublish: 'wiki-js.tar.gz' - ArtifactName: 'drop' - - # ------------------------------- - # TESTS - CYPRESS E2E TESTS - # ------------------------------- - - - job: testCypress - displayName: Cypress E2E Tests - dependsOn: buildLinux - strategy: - maxParallel: 5 - matrix: - MariaDB: - MATRIXENV: mariadb - MySQL: - MATRIXENV: mysql - MSSQLServer: - MATRIXENV: mssql - PostgreSQL: - MATRIXENV: postgres - SQLite: - MATRIXENV: sqlite - timeoutInMinutes: 30 - cancelTimeoutInMinutes: 1 - pool: - name: Azure Pipelines - vmImage: ubuntu-latest - steps: - - task: Bash@3 - displayName: Setup Environment - inputs: - targetType: filePath - filePath: './dev/cypress/ci-setup.sh' - workingDirectory: '$(Build.SourcesDirectory)' - - - script: | - docker run --name cypress --ipc=host --shm-size 1G -v $BUILD_SOURCESDIRECTORY:/e2e -w /e2e cypress/included:4.9.0 --record --key "$(CYPRESS_KEY)" --headless --group "$MATRIXENV" --ci-build-id "$BUILD_BUILDNUMBER" --config baseUrl=http://172.17.0.1:3000 - displayName: 'Run Tests' - - # ------------------------------- - # BUILD - WINDOWS - # ------------------------------- - - - job: buildWindows - displayName: Windows Build - dependsOn: buildLinux - pool: - name: Azure Pipelines - vmImage: windows-latest - timeoutInMinutes: 30 - cancelTimeoutInMinutes: 1 - steps: - - task: NodeTool@0 - displayName: 'Use Node 14.x' - inputs: - versionSpec: 14.x - - - task: 'geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3' - displayName: 'Use Yarn 1.x' - - - task: DownloadBuildArtifacts@0 - displayName: 'Download Build Artifacts' - inputs: - artifactName: drop - - - script: | - mkdir -p $(Build.SourcesDirectory)\win - tar -xzf $(System.ArtifactsDirectory)\drop\wiki-js.tar.gz -C $(Build.SourcesDirectory)\win --exclude=node_modules - displayName: 'Extract build' - - script: 'yarn --production --frozen-lockfile --non-interactive' - workingDirectory: win - displayName: 'Install dependencies' - - - task: ArchiveFiles@2 - displayName: 'Archive app' - inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)\win' - includeRootFolder: false - archiveType: tar - archiveFile: 'wiki-js-windows.tar.gz' - - - task: PublishBuildArtifacts@1 - displayName: Publish Build Artifacts - inputs: - PathtoPublish: 'wiki-js-windows.tar.gz' - ArtifactName: 'drop-win' - From 03a8f232ee20fb91a0647ca0392f9b20fcdb1443 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sun, 6 Feb 2022 22:23:06 -0500 Subject: [PATCH 12/42] docs: update BACKERS [skip ci] --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9bf07ded..f3c7276a 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - MaFarine ([@MaFarine](https://github.com/MaFarine)) - Marcilio Leite Neto ([@marclneto](https://github.com/marclneto)) - Mattias Johnson ([@mattiasJohnson](https://github.com/mattiasJohnson)) +- Max Ricketts-Uy ([@MaxRickettsUy](https://github.com/MaxRickettsUy)) - Mitchell Rowton ([@mrowton](https://github.com/mrowton)) - M. Scott Ford ([@mscottford](https://github.com/mscottford)) - Nick Halase ([@nhalase](https://github.com/nhalase)) @@ -164,7 +165,7 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - Noel Cower ([@nilium](https://github.com/nilium)) - Philipp Schmitt ([@pschmitt](https://github.com/pschmitt)) - Robert Lanzke ([@winkelement](https://github.com/winkelement)) -- Sam Martin ([@winkelement](https://github.com/ABitMoreDepth)) +- Sam Martin ([@ABitMoreDepth](https://github.com/ABitMoreDepth)) - Sean Coffey ([@seanecoffey](https://github.com/seanecoffey)) - Stephan Kristyn ([@stevek-pro](https://github.com/stevek-pro)) - Theodore Chu ([@TheodoreChu](https://github.com/TheodoreChu)) From 903948e823bc91ae198a2903125ab309663603ce Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Wed, 9 Feb 2022 02:09:33 -0500 Subject: [PATCH 13/42] docs: update BACKERS [skip ci] --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f3c7276a..136c1ad5 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - Fabio Ferrari ([@devxops](https://github.com/devxops)) - Florian Moss ([@florianmoss](https://github.com/florianmoss)) - HeavenBay ([@HeavenBay](https://github.com/heavenbay)) +- Ian Hyzy ([@ianhyzy](https://github.com/ianhyzy)) - Jaimyn Mayer ([@jabelone](https://github.com/jabelone)) - Jay Lee ([@polyglotm](https://github.com/polyglotm)) - Kelly Wardrop ([@dropcoded](https://github.com/dropcoded)) From 91ce977a1a93789bbb8e79345176877ce1c6633a Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 11 Feb 2022 17:42:17 -0500 Subject: [PATCH 14/42] docs: update BACKERS [skip ci] --- README.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 136c1ad5..61a48d6e 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,9 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - + +
+ - Akira Suenami ([@a-suenami](https://github.com/a-suenami)) - Arnaud Marchand ([@snuids](https://github.com/snuids)) @@ -149,6 +151,7 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - Ernie ([@iamernie](https://github.com/iamernie)) - Fabio Ferrari ([@devxops](https://github.com/devxops)) - Florian Moss ([@florianmoss](https://github.com/florianmoss)) +- GoodCorporateCitizen ([@GoodCorporateCitizen](https://github.com/GoodCorporateCitizen)) - HeavenBay ([@HeavenBay](https://github.com/heavenbay)) - Ian Hyzy ([@ianhyzy](https://github.com/ianhyzy)) - Jaimyn Mayer ([@jabelone](https://github.com/jabelone)) @@ -158,6 +161,10 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - MaFarine ([@MaFarine](https://github.com/MaFarine)) - Marcilio Leite Neto ([@marclneto](https://github.com/marclneto)) - Mattias Johnson ([@mattiasJohnson](https://github.com/mattiasJohnson)) + + + + - Max Ricketts-Uy ([@MaxRickettsUy](https://github.com/MaxRickettsUy)) - Mitchell Rowton ([@mrowton](https://github.com/mrowton)) - M. Scott Ford ([@mscottford](https://github.com/mscottford)) @@ -180,6 +187,9 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - rburckner ([@rburckner](https://github.com/rburckner)) - scorpion ([@scorpion](https://github.com/scorpion)) - valantien ([@valantien](https://github.com/valantien)) + +
+

OpenCollective Sponsors

@@ -315,7 +325,10 @@ Support this project by becoming a sponsor. Your logo will show up in the Contri Thank you to all our patrons! 🙏 [[Become a patron](https://www.patreon.com/requarks)] - +
+
+ + - Al Romano - Alex Balabanov - Alex Zen @@ -332,6 +345,10 @@ Thank you to all our patrons! 🙏 [[Become a patron](https://www.patreon.com/re - hong - Hope - Ian + + + + - Iskander Callos - Josh Stewart - Justin Dunsworth @@ -348,7 +365,9 @@ Thank you to all our patrons! 🙏 [[Become a patron](https://www.patreon.com/re - Stepan Sokolovskyi - Zach Maynard - 张白驹 - + +
+

OpenCollective Backers

From 8e3af9ac158bd9258d1fdf2e2ede5f79e29cdae7 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Fri, 11 Feb 2022 23:38:34 -0500 Subject: [PATCH 15/42] feat: use config value for json body parser limit --- config.sample.yml | 8 ++++++++ server/app/data.yml | 1 + server/master.js | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config.sample.yml b/config.sample.yml index 316dd603..6f4fbdf3 100644 --- a/config.sample.yml +++ b/config.sample.yml @@ -130,3 +130,11 @@ ha: false # --------------------------------------------------------------------- # Writeable data path used for cache and temporary user uploads. dataPath: ./data + +# --------------------------------------------------------------------- +# Body Parser Limit +# --------------------------------------------------------------------- +# Maximum size of API requests body that can be parsed. Does not affect +# file uploads. + +bodyParserLimit: 5mb diff --git a/server/app/data.yml b/server/app/data.yml index 0e5e45e2..e80b43d6 100644 --- a/server/app/data.yml +++ b/server/app/data.yml @@ -26,6 +26,7 @@ defaults: logLevel: info offline: false ha: false + bodyParserLimit: 5mb # DB defaults api: isEnabled: false diff --git a/server/master.js b/server/master.js index fea5e34a..a1205abd 100644 --- a/server/master.js +++ b/server/master.js @@ -91,7 +91,7 @@ module.exports = async () => { // GraphQL Server // ---------------------------------------- - app.use(bodyParser.json({ limit: '1mb' })) + app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit })) await WIKI.servers.startGraphQL() // ---------------------------------------- From 7988fa62ca2df508e517976a017e6367e833eaa9 Mon Sep 17 00:00:00 2001 From: matthgyver Date: Sat, 12 Feb 2022 05:42:28 +0100 Subject: [PATCH 16/42] fix: use body parser limit config with fallback value (#4985) * permit bodyParserLimitSize configuration set bodyParserLimitSize by default to 1mb permit modifications by environment variable * fix: use bodyparserlimit config with fallback default Co-authored-by: Nicolas Giard --- server/master.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/master.js b/server/master.js index a1205abd..8274a2ed 100644 --- a/server/master.js +++ b/server/master.js @@ -91,7 +91,7 @@ module.exports = async () => { // GraphQL Server // ---------------------------------------- - app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit })) + app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit || '1mb' })) await WIKI.servers.startGraphQL() // ---------------------------------------- From dbd7c268c30ffa3bd1bf45e2cbe2589e0fa7c67f Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sat, 12 Feb 2022 17:13:54 -0500 Subject: [PATCH 17/42] docs: update BACKERS [skip ci] --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 61a48d6e..c64b763b 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - Elijah Zobenko ([@he110](https://github.com/he110)) - Ernie ([@iamernie](https://github.com/iamernie)) - Fabio Ferrari ([@devxops](https://github.com/devxops)) +- Finsa S.p.A. ([@finsaspa](https://github.com/finsaspa)) - Florian Moss ([@florianmoss](https://github.com/florianmoss)) - GoodCorporateCitizen ([@GoodCorporateCitizen](https://github.com/GoodCorporateCitizen)) - HeavenBay ([@HeavenBay](https://github.com/heavenbay)) @@ -160,11 +161,11 @@ Support this project by becoming a sponsor. Your name will show up in the Contri - Loki ([@binaryloki](https://github.com/binaryloki)) - MaFarine ([@MaFarine](https://github.com/MaFarine)) - Marcilio Leite Neto ([@marclneto](https://github.com/marclneto)) -- Mattias Johnson ([@mattiasJohnson](https://github.com/mattiasJohnson)) +- Mattias Johnson ([@mattiasJohnson](https://github.com/mattiasJohnson)) - Max Ricketts-Uy ([@MaxRickettsUy](https://github.com/MaxRickettsUy)) - Mitchell Rowton ([@mrowton](https://github.com/mrowton)) - M. Scott Ford ([@mscottford](https://github.com/mscottford)) From afafb4f4e0d49d76d7c050fedafa0678e121739a Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 12 Feb 2022 17:27:54 -0500 Subject: [PATCH 18/42] fix: md task list - use same config as client --- client/components/editor/editor-markdown.vue | 4 ++-- server/modules/rendering/markdown-tasklists/renderer.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/components/editor/editor-markdown.vue b/client/components/editor/editor-markdown.vue index e334f07b..6134524d 100644 --- a/client/components/editor/editor-markdown.vue +++ b/client/components/editor/editor-markdown.vue @@ -290,12 +290,12 @@ const md = new MarkdownIt({ }) .use(underline) .use(mdEmoji) - .use(mdTaskLists, {label: false, labelAfter: false}) + .use(mdTaskLists, { label: false, labelAfter: false }) .use(mdExpandTabs) .use(mdAbbr) .use(mdSup) .use(mdSub) - .use(mdMultiTable, {multiline: true, rowspan: true, headerless: true}) + .use(mdMultiTable, { multiline: true, rowspan: true, headerless: true }) .use(mdMark) .use(mdFootnote) .use(mdImsize) diff --git a/server/modules/rendering/markdown-tasklists/renderer.js b/server/modules/rendering/markdown-tasklists/renderer.js index 5548e01f..6950acdd 100644 --- a/server/modules/rendering/markdown-tasklists/renderer.js +++ b/server/modules/rendering/markdown-tasklists/renderer.js @@ -6,6 +6,6 @@ const mdTaskLists = require('markdown-it-task-lists') module.exports = { init (md, conf) { - md.use(mdTaskLists, {label: true, labelAfter: true}) + md.use(mdTaskLists, { label: false, labelAfter: false }) } } From 0bc93e9792584ab8ba50971f4c44ce0dbc4c5d49 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sat, 12 Feb 2022 18:02:48 -0500 Subject: [PATCH 19/42] ci: update release changelog on publish [skip ci] --- .github/workflows/build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d778e1a..fb67b382 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -328,4 +328,21 @@ jobs: docker push ghcr.io/requarks/wiki:$MAJOR docker push ghcr.io/requarks/wiki:$MAJORMINOR docker push ghcr.io/requarks/wiki:latest + + - name: Generate Changelog + id: changelog + uses: Requarks/changelog-action@v1 + with: + token: ${{ github.token }} + tag: ${{ github.ref_name }} + writeToFile: false + + - name: Update GitHub Release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + draft: false + name: ${{ github.ref_name }} + body: ${{ steps.changelog.outputs.changes }} + token: ${{ github.token }} From fc6e4ab9c498c52752ec431178b2c589b78a730b Mon Sep 17 00:00:00 2001 From: Tomas McNamer Date: Sat, 12 Feb 2022 18:14:27 -0500 Subject: [PATCH 20/42] feat: add link to admin area on welcome page (#4035) * feat: Add link to admin area on welcome page See: #1259 * fix: remove trailing slash from welcome admin button * fix: welcome page admin button link Co-authored-by: Nicolas Giard --- client/components/welcome.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/components/welcome.vue b/client/components/welcome.vue index 815aa4bf..3e4f4af3 100644 --- a/client/components/welcome.vue +++ b/client/components/welcome.vue @@ -5,9 +5,14 @@ img.animated.fadeIn(src='/_assets/svg/logo-wikijs.svg', alt='Wiki.js') .headline.animated.fadeInUp {{ $t('welcome.title') }} .subtitle-1.mt-3.animated.fadeInUp.wait-p1s {{ $t('welcome.subtitle') }} - v-btn.mt-5.animated.fadeInUp.wait-p2s(color='primary', :href='`/e/` + locale + `/home`', x-large) - v-icon(left) mdi-plus - span {{ $t('welcome.createhome') }} + div + v-btn.mt-5.mx-3.animated.fadeInUp.wait-p2s(color='primary', :href='`/e/` + locale + `/home`', x-large) + v-icon(left) mdi-plus + span {{ $t('welcome.createhome') }} + v-btn.mt-5.mx-3.animated.fadeInUp.wait-p3s(color='primary', href='/a', x-large) + v-icon(left) mdi-view-dashboard + span {{ $t('welcome.goadmin') }} +