Repository navigation
fix: git sync deadlock + in-process task timeout + puppeteer version … #611
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: Build + Publish | |
| on: | |
| push: | |
| branches: | |
| - scarlett | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 26.x | |
| - name: Set Build Variables | |
| run: | | |
| echo "REL_VERSION=3.0.0-beta.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV | |
| - name: Set Version | |
| run: | | |
| yq -iP '.version = strenv(REL_VERSION)' backend/package.json -o json | |
| yq -iP '.version = strenv(REL_VERSION)' frontend/package.json -o json | |
| yq -i '.version = strenv(REL_VERSION) | .appVersion = strenv(REL_VERSION)' dev/chart/Chart.yaml | |
| - name: Upload translations source file | |
| uses: crowdin/github-action@v3 | |
| env: | |
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
| CROWDIN_BASE_PATH: ${{ github.workspace }} | |
| with: | |
| command: 'upload' | |
| command_args: '--config dev/crowdin.yml' | |
| - name: Build Assets | |
| working-directory: frontend | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Build Blocks | |
| working-directory: blocks | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Generate Docker Meta | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| flavor: | | |
| latest=false | |
| images: | | |
| requarks/wiki | |
| ghcr.io/requarks/wiki | |
| tags: | | |
| type=semver,pattern={{version}},value=${{ env.REL_VERSION }} | |
| type=raw,value=3.0.0-beta | |
| labels: | | |
| org.opencontainers.image.title=Wiki.js | |
| org.opencontainers.image.description=Wiki.js - Next Generation Open Source Wiki | |
| org.opencontainers.image.documentation=https://docs.js.wiki | |
| annotations: | | |
| org.opencontainers.image.title=Wiki.js | |
| org.opencontainers.image.description=Wiki.js - Next Generation Open Source Wiki | |
| org.opencontainers.image.documentation=https://docs.js.wiki | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build and push Docker images | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: dev/build/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| annotations: ${{ steps.meta.outputs.annotations }} | |
| # After the image push, so that no published chart ever names an image that is not there | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| - name: Package and push Helm chart | |
| env: | |
| REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| helm lint --strict dev/chart | |
| helm package dev/chart --destination _chart | |
| echo "$REGISTRY_TOKEN" | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin | |
| helm push "_chart/wiki-${REL_VERSION}.tgz" oci://ghcr.io/requarks/charts | |
| - name: Prepare build archive | |
| run: | | |
| mkdir -p _dist/blocks | |
| cp -R assets _dist/assets | |
| cp -R blocks/compiled _dist/blocks/compiled | |
| cp -R backend _dist/backend | |
| cp LICENSE _dist/LICENSE | |
| cp config.sample.yml _dist/config.sample.yml | |
| cd _dist/backend | |
| npm ci --omit=dev | |
| cd - | |
| find ./_dist/ -printf "%P\n" | tar -czf wiki-js.tar.gz --no-recursion -C ./_dist/ -T - | |
| - name: Upload Build Artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: build | |
| path: wiki-js.tar.gz | |
| # - name: Create Prerelease | |
| # uses: ncipollo/release-action@v1.21.0 | |
| # with: | |
| # prerelease: true | |
| # draft: false | |
| # owner: requarks | |
| # repo: wiki | |
| # commit: ${{ github.sha }} | |
| # tag: ${{ env.REL_VERSION }} | |
| # name: ${{ env.REL_VERSION }} | |
| # omitBody: true | |
| # token: ${{ github.token }} | |