diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 49e68625..aa574ccd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,7 +4,7 @@ So that your PR can be handled effectively, please populate the following fields --> **Category**: -> One of: Bugfix / Feature / Code style update / Refactoring Only / Build related changes / Documentation / Other (please specify) +> For example: Bugfix / Feature / Docs / Dependency Updates / Localization / Widget / Theme **Overview** > Briefly outline your new changes... @@ -15,13 +15,4 @@ So that your PR can be handled effectively, please populate the following fields > If you've added any new build scripts, environmental variables, config file options, dependency or devDependency, please outline here **Screenshot** _(if applicable)_ -> If you've introduced any significant UI changes, please include a screenshot - -**Code Quality Checklist** _(Please complete)_ -- [ ] All changes are backwards compatible -- [ ] All lint checks and tests are passing -- [ ] There are no (new) build warnings or errors -- [ ] _(If a new config option is added)_ Attribute is outlined in the schema and documented -- [ ] _(If a new dependency is added)_ Package is essential, and has been checked out for security or performance -- [ ] _(If significant change)_ Bumps version in package.json - +> If you've introduced any significant UI changes, widget or theme please include a screenshot diff --git a/.github/workflows/auto-rebase-pr.yml b/.github/workflows/auto-rebase-pr.yml deleted file mode 100644 index f08bb70d..00000000 --- a/.github/workflows/auto-rebase-pr.yml +++ /dev/null @@ -1,23 +0,0 @@ -# When a '/rebase' comment is added to a PR, it will be rebased from the main branch -name: ๐Ÿ—๏ธ Automatic PR Rebase -on: - issue_comment: - types: [created] -jobs: - rebase: - name: Rebase - if: > - github.event.issue.pull_request != '' - && contains(github.event.comment.body, '/rebase') - && github.event.comment.author_association == 'MEMBER' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - name: Rebase - uses: cirrus-actions/rebase@1.4 - env: - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build-docs-site.yml b/.github/workflows/build-docs-site.yml deleted file mode 100644 index 65b5913c..00000000 --- a/.github/workflows/build-docs-site.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Builds and published Dashy's documentation website -name: ๐Ÿ“ Build Docs Site -on: - workflow_dispatch: - push: - branches: [ WEBSITE/docs-site-source ] -jobs: - deploy: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/WEBSITE/docs-site-source' - steps: - - uses: actions/checkout@master - - uses: redkubes/docusaurus-deploy-action@v1 - with: - source-folder: ./ - git-user: ${{ github.actor }} - git-password: ${{ secrets.GITHUB_TOKEN }} - deployment-branch: gh-pages diff --git a/.github/workflows/bump-and-tag.yml b/.github/workflows/bump-and-tag.yml new file mode 100644 index 00000000..e0ab2f3e --- /dev/null +++ b/.github/workflows/bump-and-tag.yml @@ -0,0 +1,108 @@ +# When a PR is merged into master, this workflow handles versioning: +# - If code files changed but version wasn't bumped: auto-increments patch version +# - Creates and pushes a git tag for the new version +# - The tag then triggers Docker publishing and release drafting +name: ๐Ÿ”– Auto Version & Tag + +on: + pull_request_target: + types: [closed] + branches: [master] + +concurrency: + group: auto-version-and-tag + cancel-in-progress: false + +permissions: + contents: read + pull-requests: read + +jobs: + version-and-tag: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - name: Check PR for code changes and version bump ๐Ÿ“‚ + id: check_pr + uses: actions/github-script@v7 + with: + script: | + const { owner, repo } = context.repo; + const pull_number = context.payload.pull_request.number; + + const files = await github.paginate( + github.rest.pulls.listFiles, { owner, repo, pull_number } + ); + const codePatterns = [ + /^src\//, /^services\//, /^public\//, /^Dockerfile$/, /^[^/]+\.js$/, + ]; + const codeChanged = files.some(f => + codePatterns.some(p => p.test(f.filename)) + ); + const pkgChanged = files.some(f => f.filename === 'package.json'); + + if (!codeChanged && !pkgChanged) { + core.info('No code or package.json changes, skipping'); + core.setOutput('needs_bump', 'false'); + core.setOutput('needs_tag', 'false'); + return; + } + + let versionBumped = false; + if (pkgChanged) { + const mergeSha = context.payload.pull_request.merge_commit_sha; + const { data: mergeCommit } = await github.rest.git.getCommit({ + owner, repo, commit_sha: mergeSha, + }); + const parentSha = mergeCommit.parents[0].sha; + const getVersion = async (ref) => { + const { data } = await github.rest.repos.getContent({ + owner, repo, path: 'package.json', ref, + }); + return JSON.parse(Buffer.from(data.content, 'base64').toString()).version; + }; + const [prevVersion, mergeVersion] = await Promise.all([ + getVersion(parentSha), getVersion(mergeSha), + ]); + versionBumped = prevVersion !== mergeVersion; + core.info(`Version: ${prevVersion} โ†’ ${mergeVersion}`); + } + + const needsBump = codeChanged && !versionBumped; + const needsTag = codeChanged || versionBumped; + core.info(`Needs bump: ${needsBump}, Needs tag: ${needsTag}`); + core.setOutput('needs_bump', needsBump.toString()); + core.setOutput('needs_tag', needsTag.toString()); + + - name: Checkout repository ๐Ÿ›Ž๏ธ + if: steps.check_pr.outputs.needs_tag == 'true' + uses: actions/checkout@v4 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + + - name: Configure git identity ๐Ÿ‘ค + if: steps.check_pr.outputs.needs_tag == 'true' + run: | + git config user.name "Liss-Bot" + git config user.email "liss-bot@d0h.co" + + - name: Bump patch version โฌ†๏ธ + if: steps.check_pr.outputs.needs_bump == 'true' + run: | + npm version patch --no-git-tag-version + git add package.json + git commit -m "โฌ†๏ธ Bump version to $(node -p "require('./package.json').version")" + git push + + - name: Create and push tag ๐Ÿท๏ธ + if: steps.check_pr.outputs.needs_tag == 'true' + run: | + VERSION=$(node -p "require('./package.json').version") + git fetch --tags --force + if git rev-parse "refs/tags/$VERSION" >/dev/null 2>&1; then + echo "Tag $VERSION already exists, skipping" + exit 0 + fi + git tag -a "$VERSION" -m "Release v$VERSION" + git push origin "$VERSION" diff --git a/.github/workflows/check-merge-conflicts.yml b/.github/workflows/check-merge-conflicts.yml deleted file mode 100644 index d00df142..00000000 --- a/.github/workflows/check-merge-conflicts.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Detect and label pull requests that have merge conflicts -name: ๐Ÿ—๏ธ Check Merge Conflicts -on: - push: - branches: - - master -jobs: - check-conflicts: - runs-on: ubuntu-latest - steps: - - uses: mschilde/auto-label-merge-conflicts@master - with: - CONFLICT_LABEL_NAME: "๐Ÿšซ Merge Conflicts" - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - MAX_RETRIES: 5 - WAIT_MS: 5000 diff --git a/.github/workflows/create-tag-for-version.yml b/.github/workflows/create-tag-for-version.yml deleted file mode 100644 index e20cb5d3..00000000 --- a/.github/workflows/create-tag-for-version.yml +++ /dev/null @@ -1,55 +0,0 @@ -# When Dashy's version in package.json is updated -# this workflow will create a new tag -# And then publish it to the repository -name: ๐Ÿ—๏ธ Tag on Version Change - -on: - workflow_dispatch: - push: - branches: - - master - paths: - - 'package.json' - -jobs: - tag-if-version-updated: - runs-on: ubuntu-latest - - steps: - - name: Check Out Repository ๐Ÿ›Ž๏ธ - uses: actions/checkout@v2 - - - name: Set Up Python ๐Ÿ - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - - name: Extract Version from package.json ๐Ÿ”ข - id: package_version - run: | - import json - with open('package.json', 'r') as f: - version = json.load(f)['version'] - print(f"::set-output name=VERSION::{version}") - shell: python - - - name: Get Latest Tag ๐Ÿท๏ธ - id: latest_tag - run: | - git fetch --tags - latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` 2>/dev/null) - echo "::set-output name=TAG::${latest_tag:-0}" - - - name: Create and Push Tag โคด๏ธ - if: steps.package_version.outputs.VERSION != steps.latest_tag.outputs.TAG && steps.latest_tag.outputs.TAG != '0' - run: | - git config --local user.email "liss-bot@d0h.co" - git config --local user.name "Liss-Bot" - git tag -a ${{ steps.package_version.outputs.VERSION }} -m "Release v${{ steps.package_version.outputs.VERSION }}" - git push origin ${{ steps.package_version.outputs.VERSION }} - env: - GIT_AUTHOR_NAME: Liss-Bot - GIT_AUTHOR_EMAIL: liss-bot@d0h.co - GIT_COMMITTER_NAME: Liss-Bot - GIT_COMMITTER_EMAIL: liss-bot@d0h.co - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dependency-updates-summary.yml b/.github/workflows/dependency-updates-summary.yml index a9c41303..e05359a9 100644 --- a/.github/workflows/dependency-updates-summary.yml +++ b/.github/workflows/dependency-updates-summary.yml @@ -1,7 +1,10 @@ # Shows changes to any yarn.lock in PR comment # Useful for easily understanding dependency changes and consequences name: ๐Ÿ’ก Show Dependency Changes -on: [pull_request] +on: + pull_request: + paths: + - 'yarn.lock' jobs: check: runs-on: ubuntu-latest @@ -15,3 +18,4 @@ jobs: collapsibleThreshold: '25' failOnDowngrade: 'false' path: 'yarn.lock' + updateComment: 'true' diff --git a/.github/workflows/docker-build-publish.yml b/.github/workflows/docker-build-publish.yml index 27851e01..b1112533 100644 --- a/.github/workflows/docker-build-publish.yml +++ b/.github/workflows/docker-build-publish.yml @@ -3,15 +3,7 @@ name: ๐Ÿณ Build + Publish Multi-Platform Image on: workflow_dispatch: push: - branches: ['master'] - tags: ['*.*'] - paths: - - '**.js' - - 'src/**' - - 'public/**' - - 'services/**' - - '.github/workflows/docker-build-publish.yml' - - 'Dockerfile' + tags: ['*.*.*'] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -28,26 +20,21 @@ jobs: docker: runs-on: ubuntu-latest permissions: { contents: read, packages: write } - if: "!contains(github.event.head_commit.message, '[ci-skip]')" steps: - name: ๐Ÿ›Ž๏ธ Checkout Repo - uses: actions/checkout@v3 - - - name: ๐Ÿ”– Get App Version - uses: tyankatsu0105/read-package-version-actions@v1 - id: package-version + uses: actions/checkout@v4 - name: ๐Ÿ—‚๏ธ Make Docker Meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: | ${{ env.DH_IMAGE }} ghcr.io/${{ env.GH_IMAGE }} tags: | type=ref,event=tag - type=semver,pattern={{version}},enable=false + type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.x type=raw,value=latest flavor: | @@ -61,42 +48,31 @@ jobs: org.opencontainers.image.licenses=MIT - name: ๐Ÿ”ง Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 with: platforms: linux/amd64,linux/arm64,linux/arm/v7 - name: ๐Ÿ”ง Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - use-buildkit: true - buildkit-daemon-opts: "--oci-worker-no-process-sandbox" - - - name: ๐Ÿ‘€ Inspect builder - run: | - echo "Name: ${{ steps.buildx.outputs.name }}" - echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" - echo "Status: ${{ steps.buildx.outputs.status }}" - echo "Flags: ${{ steps.buildx.outputs.flags }}" - echo "Platforms: ${{ steps.buildx.outputs.platforms }}" + uses: docker/setup-buildx-action@v3 - name: ๐Ÿ”‘ Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: ๐Ÿ”‘ Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿšฆ Check Registry Status - uses: crazy-max/ghaction-docker-status@v1 + uses: crazy-max/ghaction-docker-status@v3 - name: โš’๏ธ Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 251349ef..ea01e183 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -3,8 +3,7 @@ name: ๐Ÿ—๏ธ Draft New Release on: push: tags: - - '^[0-9]+\.[0-9]+\.[0-9]+$' - - '**' + - '*.*.*' workflow_dispatch: inputs: tag: @@ -16,21 +15,43 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code ๐Ÿ›Ž๏ธ - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - fetch-depth: 0 # We need all history for generating release notes + fetch-depth: 0 + + - name: Check if major or minor version changed ๐Ÿ” + id: version_check + run: | + CURRENT_TAG="${{ github.event.inputs.tag || github.ref_name }}" + git fetch --tags --force + PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -v "^${CURRENT_TAG}$" | head -1) + if [ -z "$PREVIOUS_TAG" ]; then + echo "No previous tag found, creating release" + echo "should_release=true" >> $GITHUB_OUTPUT + exit 0 + fi + CURRENT_MM=$(echo "$CURRENT_TAG" | sed 's/^v//; s/\([0-9]*\.[0-9]*\)\..*/\1/') + PREVIOUS_MM=$(echo "$PREVIOUS_TAG" | sed 's/^v//; s/\([0-9]*\.[0-9]*\)\..*/\1/') + if [ "$CURRENT_MM" = "$PREVIOUS_MM" ]; then + echo "Patch-only bump ($PREVIOUS_TAG -> $CURRENT_TAG), skipping release" + echo "should_release=false" >> $GITHUB_OUTPUT + else + echo "Major or minor bump ($PREVIOUS_TAG -> $CURRENT_TAG), creating release" + echo "should_release=true" >> $GITHUB_OUTPUT + fi - name: Create Draft Release ๐Ÿ“ + if: steps.version_check.outputs.should_release == 'true' || github.event_name == 'workflow_dispatch' id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.event.inputs.tag || github.ref_name }} - release_name: Release ${{ github.event.inputs.tag || github.ref_name }} + name: Release ${{ github.event.inputs.tag || github.ref_name }} draft: true prerelease: false generate_release_notes: true + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - name: Output new release URL โ†—๏ธ - run: 'echo "Draft release URL: ${{ steps.create_release.outputs.html_url }}"' + if: steps.create_release.outputs.url + run: 'echo "Draft release URL: ${{ steps.create_release.outputs.url }}"' diff --git a/.github/workflows/get-size.yml b/.github/workflows/get-size.yml deleted file mode 100644 index d778e35a..00000000 --- a/.github/workflows/get-size.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Adds a comment to new PRs, showing the compressed size and size difference of new code -# And also labels the PR based on the number of lines changes -name: ๐ŸŒˆ Check PR Size -on: [pull_request] -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - # Find and comment with compressed size - - name: Get Compressed Size - uses: preactjs/compressed-size-action@v2 - with: - repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - pattern: './dist/**/*.{js,css,html}' - strip-hash: '\\b\\w{8}\\.' - exclude: '{./dist/manifest.json,**/*.map,**/node_modules/**}' - minimum-change-threshold: 100 - # Check number of lines of code added - - name: Label based on Lines of Code - uses: codelytv/pr-size-labeler@v1 - with: - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - xs_max_size: '10' - s_max_size: '100' - m_max_size: '500' - l_max_size: '1000' - s_label: '๐ŸŸฉ PR - Small' - m_label: '๐ŸŸจ PR - Medium' - l_label: '๐ŸŸง PR - Large' - xl_label: '๐ŸŸฅ PR - XL' - fail_if_xl: 'false' - message_if_xl: > - It looks like this PR is very large (over 1000 lines). - Try to avoid addressing multiple issues in a single PR, and - in the future consider breaking large tasks down into smaller steps. - This it to make reviewing, testing, reverting and general quality management easier. diff --git a/.github/workflows/lgtm-comment.yml b/.github/workflows/lgtm-comment.yml deleted file mode 100644 index d0ccf496..00000000 --- a/.github/workflows/lgtm-comment.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Replies with a random looks-good GIF, when a PR is reviewed with a LGTM comment -name: ๐Ÿ’ก Random LGTM GIF -on: - issue_comment: { types: [created] } - pull_request_review: { types: [submitted] } -jobs: - post: - runs-on: ubuntu-latest - if: (!contains(github.actor, '[bot]')) # Exclude bot comment - steps: - - uses: ddradar/choose-random-action@v1 - id: act - with: - contents: | - https://media4.giphy.com/media/11ISwbgCxEzMyY/giphy.gif - https://media4.giphy.com/media/SgwPtMD47PV04/giphy.gif - https://media1.giphy.com/media/3orifdxwbvVLfS3CrS/giphy.gif - https://media4.giphy.com/media/RPwrO4b46mOdy/giphy.gif - https://media2.giphy.com/media/3o7abGQa0aRJUurpII/giphy.gif - https://media3.giphy.com/media/ZZrDTGSJXlHW9Y2khu/giphy.gif - https://media3.giphy.com/media/5DQdk5oZzNgGc/giphy.gif - https://media4.giphy.com/media/3o7abB06u9bNzA8lu8/giphy.gif - https://media4.giphy.com/media/l2JJrEx9aRsjNruhi/giphy.gif - - uses: ddradar/lgtm-action@v1 - with: - image-url: ${{ steps.act.outputs.selected }} - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/manage-pending-labels-closed.yml b/.github/workflows/manage-pending-labels-closed.yml deleted file mode 100644 index 10a05894..00000000 --- a/.github/workflows/manage-pending-labels-closed.yml +++ /dev/null @@ -1,17 +0,0 @@ -# When a new comment is added to an issue, if it had the Stale or Awaiting User Response labels, -# then those labels will be removed, providing it was not user lissy93 who added the commend. -name: ๐ŸŽฏ Remove Pending Labels on Close -on: - issues: - types: [closed] -jobs: - remove-labels: - runs-on: ubuntu-latest - steps: - - name: Remove Labels when Closed - uses: actions-cool/issues-helper@v2 - with: - actions: remove-labels - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - labels: '๐Ÿš Awaiting User Response,โšฐ๏ธ Stale,๐Ÿ‘ค Awaiting Maintainer Response' diff --git a/.github/workflows/manage-pending-labels.yml b/.github/workflows/manage-pending-labels.yml deleted file mode 100644 index 46d48a32..00000000 --- a/.github/workflows/manage-pending-labels.yml +++ /dev/null @@ -1,42 +0,0 @@ -# When a new comment is added to an issue, if it had the Stale or Awaiting User Response labels, -# then those labels will be removed, providing it was not user lissy93 who added the commend. -name: ๐ŸŽฏ Add/ Remove Awaiting Response Labels -on: - issue_comment: - types: [created] -jobs: - remove-stale: - runs-on: ubuntu-latest - if: ${{ github.event.comment.author_association != 'COLLABORATOR' && github.event.comment.author_association != 'OWNER' }} - steps: - - name: Remove Stale labels when Updated - uses: actions-cool/issues-helper@v2 - with: - actions: remove-labels - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - labels: '๐Ÿš Awaiting User Response,โšฐ๏ธ Stale' - - add-awaiting-author: - runs-on: ubuntu-latest - if: ${{!github.event.issue.pull_request && github.event.comment.author_association != 'COLLABORATOR' && github.event.comment.author_association != 'OWNER' && github.event.issue.state == 'open' }} - steps: - - name: Add Awaiting Author labels when Updated - uses: actions-cool/issues-helper@v2 - with: - actions: add-labels - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - labels: '๐Ÿ‘ค Awaiting Maintainer Response' - - remove-awaiting-author: - runs-on: ubuntu-latest - if: ${{ github.event.comment.author_association == 'OWNER' }} - steps: - - name: Remove Awaiting Author labels when Updated - uses: actions-cool/issues-helper@v2 - with: - actions: remove-labels - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.issue.number }} - labels: '๐Ÿ‘ค Awaiting Maintainer Response' diff --git a/.github/workflows/manual-tag.yml b/.github/workflows/manual-tag.yml new file mode 100644 index 00000000..8248180c --- /dev/null +++ b/.github/workflows/manual-tag.yml @@ -0,0 +1,66 @@ +# Manual fallback for creating a tag with optional version bump. +# The automated flow is handled by bump-and-tag.yml on PR merge. +name: ๐Ÿท๏ธ Tag on Version Change + +on: + workflow_dispatch: + inputs: + version: + description: 'Version to tag (e.g. 3.2.0). Leave empty to auto-bump patch.' + required: false + +concurrency: + group: manual-tag-version + cancel-in-progress: false + +jobs: + tag-version: + runs-on: ubuntu-latest + + steps: + - name: Check Out Repository ๐Ÿ›Ž๏ธ + uses: actions/checkout@v4 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Configure Git Identity ๐Ÿค– + run: | + git config user.name "Liss-Bot" + git config user.email "liss-bot@d0h.co" + + - name: Determine and Apply Version ๐Ÿ”ข + id: version + env: + INPUT_VERSION: ${{ github.event.inputs.version }} + run: | + CURRENT=$(node -p "require('./package.json').version") + if [ -n "$INPUT_VERSION" ]; then + TARGET="${INPUT_VERSION#v}" + else + npm version patch --no-git-tag-version > /dev/null + TARGET=$(node -p "require('./package.json').version") + fi + if [ "$TARGET" != "$CURRENT" ]; then + npm version "$TARGET" --no-git-tag-version --allow-same-version + git add package.json + git commit -m "๐Ÿ”– Bump version to $TARGET [skip ci]" + git push + echo "Committed version bump to $TARGET" + else + echo "package.json already at $CURRENT, skipping commit" + fi + echo "TARGET=$TARGET" >> $GITHUB_OUTPUT + + - name: Create and Push Tag โคด๏ธ + env: + TAG: ${{ steps.version.outputs.TARGET }} + run: | + git fetch --tags --force + if git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; then + echo "Tag $TAG already exists, skipping" + else + git tag -a "$TAG" -m "Release v$TAG" + git push origin "$TAG" + echo "Created and pushed tag $TAG" + fi diff --git a/.github/workflows/pr-quality-check.yml b/.github/workflows/pr-quality-check.yml new file mode 100644 index 00000000..61c52392 --- /dev/null +++ b/.github/workflows/pr-quality-check.yml @@ -0,0 +1,115 @@ +name: ๐Ÿ” PR Quality Check + +on: + pull_request: + branches: ['master', 'develop'] + paths-ignore: + - '**.md' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: ๐Ÿ“ Lint Code + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ›Ž๏ธ Checkout Code + uses: actions/checkout@v4 + + - name: ๐Ÿ”ง Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: ๐Ÿ“ฆ Install Dependencies + run: yarn install --frozen-lockfile + + - name: ๐Ÿ” Run ESLint + run: yarn lint + + test: + name: ๐Ÿงช Run Tests + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ›Ž๏ธ Checkout Code + uses: actions/checkout@v4 + + - name: ๐Ÿ”ง Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: ๐Ÿ“ฆ Install Dependencies + run: yarn install --frozen-lockfile + + - name: ๐Ÿงช Run Tests + run: yarn test + + build: + name: ๐Ÿ—๏ธ Build Application + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ›Ž๏ธ Checkout Code + uses: actions/checkout@v4 + + - name: ๐Ÿ”ง Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: ๐Ÿ“ฆ Install Dependencies + run: yarn install --frozen-lockfile + + - name: ๐Ÿ—๏ธ Build Project + run: yarn build + env: + NODE_OPTIONS: --openssl-legacy-provider + + - name: โœ… Verify Build Output + run: | + if [ ! -d "dist" ]; then + echo "โŒ Build failed: dist directory not created" + exit 1 + fi + if [ ! -f "dist/index.html" ]; then + echo "โŒ Build failed: index.html not found" + exit 1 + fi + echo "โœ… Build successful" + + docker-smoke: + name: ๐Ÿณ Docker Smoke Test + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: ๐Ÿ›Ž๏ธ Checkout Code + uses: actions/checkout@v4 + + - name: ๐Ÿณ Build & Test Docker Image + run: sh tests/docker-smoke-test.sh + timeout-minutes: 10 + + security: + name: ๐Ÿ”’ Security Audit + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: ๐Ÿ›Ž๏ธ Checkout Code + uses: actions/checkout@v4 + + - name: ๐Ÿ”ง Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: ๐Ÿ“ฆ Install Dependencies + run: yarn install --frozen-lockfile + + - name: ๐Ÿ”’ Run Security Audit + run: yarn audit --level high diff --git a/.github/workflows/update-docs-site.yml b/.github/workflows/update-docs-site.yml index a87ba08c..7964bf38 100644 --- a/.github/workflows/update-docs-site.yml +++ b/.github/workflows/update-docs-site.yml @@ -16,35 +16,49 @@ on: # Jobs to be run: # 1. Checkout master branch # 2. Checkout website source code branch -# 3. Install Python -# 4. Copy /docs from master to website branch -# 5. Run the script which processes documentation -# 6. Commit and push updated docs to the website source code branch +# 3. Install Python and Node.js +# 4. Install website dependencies (Docusaurus) +# 5. Copy /docs from master to website branch +# 6. Run the script which processes documentation and tests the build +# 7. Commit and push updated docs to the website source code branch jobs: update-docs: runs-on: ubuntu-latest steps: - name: Checkout master branch ๐Ÿ›Ž๏ธ - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: 'master-docs' + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - name: Checkout WEBSITE/docs-site-source branch ๐Ÿ›Ž๏ธ - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: 'WEBSITE/docs-site-source' path: 'website-docs' + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - name: Install Python ๐Ÿ - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.x' + - name: Setup Node.js ๐ŸŸข + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install website dependencies ๐Ÿ“ฆ + working-directory: website-docs + run: yarn install --frozen-lockfile + - name: Run script to update documentation ๐Ÿช„ working-directory: website-docs + env: + NODE_OPTIONS: '--openssl-legacy-provider' run: | cp -r ../master-docs/docs ./ - python ./do-markdown-magic.py + python ./do-doc-updaty-magic.py - name: Commit changes ๐Ÿš€ run: | diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 00000000..4f14322d --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +--ignore-engines true diff --git a/.yarnrc.yml b/.yarnrc.yml deleted file mode 100644 index 3186f3f0..00000000 --- a/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/README.md b/README.md index 37f0534f..3f7c19c4 100644 --- a/README.md +++ b/README.md @@ -11,25 +11,26 @@ ---

-Dashy is kindly sponsored by LambdaTest - Browser Testing
- - LambdaTest +Dashy is kindly sponsored by SSD Nodes - Affordable VPS hosting for self-hosters
+ + SSD Nodes

-


Dashy is kindly sponsored by Umbrel - the personal home cloud and OS for self-hosting
- +

- -> [!NOTE] -> Version [3.0.0](https://github.com/Lissy93/dashy/releases/tag/3.0.0) has been released, and requires some changes to your setup, see [#1529](https://github.com/Lissy93/dashy/discussions/1529) for details. - +

+Dashy is kindly sponsored by TestMu AI - The worldโ€™s first full-stack Agentic AI Quality Engineering platform
+ + LambdaTest + +

Table of Contents @@ -433,6 +434,7 @@ Dashy supports multiple languages and locales. When available, your language sho - ๐Ÿ‡ท๐Ÿ‡บ **Russian**: `ru` -Contributed by **[@sasetz](https://github.com/sasetz)** - ๐Ÿ‡ธ๐Ÿ‡ฐ **Slovak**: `sk` - Contributed by **[@Smexhy](https://github.com/Smexhy)** - ๐Ÿ‡ธ๐Ÿ‡ฎ **Slovenian**: `sl` - Contributed by **[@UrekD](https://github.com/UrekD)** +- ๐Ÿ‡ฐ๐Ÿ‡ฌ **Kyrgyz**: `ky` - Contributed by **[@noblepower1337](https://github.com/noblepower1337)** - ๐Ÿ‡ช๐Ÿ‡ธ **Spanish**: `es` - Contributed by **[@lu4t](https://github.com/lu4t)** - ๐Ÿ‡ธ๐Ÿ‡ช **Swedish**: `sv` - Contributed by **[@BOZG](https://github.com/BOZG)** - ๐Ÿ‡น๐Ÿ‡ผ **Traditional Chinese**: `zh-TW` - Contributed by **[@stanly0726](https://github.com/stanly0726)** diff --git a/docs/deployment.md b/docs/deployment.md index 3f10642a..90de283b 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -101,7 +101,6 @@ The following is a complete example of a [`docker-compose.yml`](https://github.c ```yaml --- -version: "3.8" services: dashy: # To build from source, replace 'image: lissy93/dashy' with 'build: .' diff --git a/docs/release-workflow.md b/docs/release-workflow.md index 98ff32a2..4ee441ff 100644 --- a/docs/release-workflow.md +++ b/docs/release-workflow.md @@ -5,6 +5,7 @@ - [Deployment Process](#deployment-process) - [Git Strategy](#git-strategy) - [Automated Workflows](#automated-workflows) +- [Release Pipeline](#release-pipeline) ## Release Schedule @@ -22,24 +23,17 @@ All changes and new features are submitted as pull requests, which can then be t When a PR is opened: -- The feature branch is built, and deployed as a Netlify instance. This can be accessed at: `https://deploy-preview-[pr-number]--dashy-dev.netlify.app`, and this URL as well as a link to the build logs are added as a comment on the PR by Netlify bot -- Depending on what files were modified, the bot may also add a comment to remind the author of useful info -- A series of checks will run on the new code, using GH Actions, and prevent merging if they fail. This includes: linting, testing, code quality and complexity checking, security scanning and a spell check -- If a new dependency was added, liss-bot will comment with a summary of those changes, as well as the cost of the module, version, and any security concerns. If the bundle size has increased, this will also be added as a comment +- A series of CI checks run against the new code (lint, test, build, Docker smoke test, security audit). The PR cannot be merged if any required check fails +- If `yarn.lock` was modified, Liss-Bot adds a comment summarising which packages changed -After the PR is merged: +After the PR is merged into master: -- The app is build, and deployed to: -- A new tag in GitHub is created, using the apps version number (from the package.json) -- The Docker container is built, and published under the `:latest` tag on DockerHub and GHCR +- If code files changed and the version in package.json wasn't already bumped, the patch version is auto-incremented and committed ([bump-and-tag.yml](https://github.com/Lissy93/dashy/blob/master/.github/workflows/bump-and-tag.yml)) +- A git tag is created and pushed for the new version +- The tag push triggers Docker image builds for `linux/amd64`, `linux/arm64` and `linux/arm/v7`, published to both DockerHub and GHCR ([docker-build-publish.yml](https://github.com/Lissy93/dashy/blob/master/.github/workflows/docker-build-publish.yml)) +- If the tag is a major or minor version bump, a draft GitHub release is created with auto-generated release notes ([draft-release.yml](https://github.com/Lissy93/dashy/blob/master/.github/workflows/draft-release.yml)). Patch-only bumps skip the release -When a new major version is released: - -- A new GitHub release is created and published, under new versions tag, with info from the changelog -- The container is built and published under a new tag will be created on DockerHub, called `:release-[version]` -- An announcement is opened in GitHub discussions, outlining the main changes, where users can comment and ask questions - -[![Netlify Status](https://api.netlify.com/api/v1/badges/3a0216c3-1ed0-40f5-ad90-ff68b1c96c09/deploy-status)](https://app.netlify.com/sites/dashy-dev/deploys) +Manual tagging is also available via the [manual-tag.yml](https://github.com/Lissy93/dashy/blob/master/.github/workflows/manual-tag.yml) workflow. You can either provide a specific version (e.g. `3.2.0`) or leave it empty to auto-bump the patch version. This is useful if the automated flow didn't trigger or you need to cut a release outside the normal PR flow. --- @@ -115,52 +109,68 @@ When you submit your PR, include the required info, by filling out the PR templa Dashy makes heavy use of [GitHub Actions](https://github.com/features/actions) to fully automate the checking, testing, building, deploying of the project, as well as administration tasks like management of issues, tags, releases and documentation. The following section outlines each workflow, along with a link the the action file, current status and short description. A lot of these automations were made possible using community actions contributed to GH marketplace by some amazing people. -### Code Processing +### CI Checks + +These run on every pull request targeting master. All required checks must pass before merging. Action | Description --- | --- -**Code Linter**
[![code-linter.yml](https://github.com/Lissy93/dashy/actions/workflows/code-linter.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/code-linter.yml) | After a pull request is created, all new code changes will be linted, and the CI will fail with a helpful message if the code has any formatting inconsistencies -**Code Spell Check**
[![code-spell-check.yml](https://github.com/Lissy93/dashy/actions/workflows/code-spell-check.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/code-spell-check.yml) | After a PR submitted, all auto-fixable spelling errors will be detected, then Liss-Bot will create a separate PR to propose the fixes -**Dependency Update Summary**
[![dependency-updates-summary.yml](https://github.com/Lissy93/dashy/actions/workflows/dependency-updates-summary.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/dependency-updates-summary.yml) | After a PR is submitted, if any of the dependencies are modified, then Liss-Bot will add a comment, explaining which packages have been added, removed, updated or downgraded, as well as other helpful info -**Get Size**
[![get-size.yml](https://github.com/Lissy93/dashy/actions/workflows/get-size.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/get-size.yml) | Adds comment to PR if the size of the built + bundled application has changed compared to the previous version -**Security Scan**
[![security-scanning.yml](https://github.com/Lissy93/dashy/actions/workflows/security-scanning.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/security-scanning.yml) | Uses Snyk to scan the code and dependencies after a PR. Will add a comment and cause the build to fail if a new vulnerability or potential issue is present +**PR Quality Check**
[![pr-quality-check.yml](https://github.com/Lissy93/dashy/actions/workflows/pr-quality-check.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/pr-quality-check.yml) | Runs lint, unit tests, a full build and Docker smoke test against every PR. Also runs a security audit on dependencies +**Dependency Update Summary**
[![dependency-updates-summary.yml](https://github.com/Lissy93/dashy/actions/workflows/dependency-updates-summary.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/dependency-updates-summary.yml) | When yarn.lock is modified in a PR, Liss-Bot comments with a summary of which packages changed ### Releases Action | Description --- | --- -**Create Tag**
[![auto-tag-pr.yml](https://github.com/Lissy93/dashy/actions/workflows/auto-tag-pr.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/auto-tag-pr.yml) | Whenever the version indicated in package.json is updates, a new GitHub tag will be created for that point in time -**Build App**
[![build-app.yml](https://github.com/Lissy93/dashy/actions/workflows/build-app.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/build-app.yml) | After changes are merged into the master branch, the app will be build, with output pushed to the `dev-demo` branch -**Cache Artifacts**
[![cache-artifacts.yml](https://github.com/Lissy93/dashy/actions/workflows/cache-artifacts.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/cache-artifacts.yml) | After build, returned files will be cached for future actions for that commit -**Docker Publish**
[![docker-publish.yml](https://github.com/Lissy93/dashy/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/docker-publish.yml) | After PR is merged, the multi-architecture Docker container will be built, and then published to GHCR +**Auto Version & Tag**
[![bump-and-tag.yml](https://github.com/Lissy93/dashy/actions/workflows/bump-and-tag.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/bump-and-tag.yml) | When a PR with code changes is merged into master, auto-bumps the patch version (if not already bumped) and creates a git tag +**Manual Tag**
[![manual-tag.yml](https://github.com/Lissy93/dashy/actions/workflows/manual-tag.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/manual-tag.yml) | Manual dispatch workflow. Provide a version to tag, or leave empty to auto-bump patch. Updates package.json, commits and creates the tag +**Docker Publish**
[![docker-build-publish.yml](https://github.com/Lissy93/dashy/actions/workflows/docker-build-publish.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/docker-build-publish.yml) | Triggered by tag pushes. Builds multi-arch Docker images and publishes to DockerHub and GHCR with semver tags +**Draft Release**
[![draft-release.yml](https://github.com/Lissy93/dashy/actions/workflows/draft-release.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/draft-release.yml) | Triggered by tag pushes. Creates a draft GitHub release with auto-generated notes for major or minor version bumps. Patch-only bumps are skipped ### Issue Management Action | Description --- | --- -**Close Incomplete Issues**
[![close-incomplete-issues.yml](https://github.com/Lissy93/dashy/actions/workflows/close-incomplete-issues.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/close-incomplete-issues.yml) | Issues which do not match any of the issue templates will be closed, and a comment posted explaining why -**Close Stale Issues**
[![close-stale-issues.yml](https://github.com/Lissy93/dashy/actions/workflows/close-stale-issues.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/close-stale-issues.yml) | Issues which have not been updated for 6 weeks will have a comment posted to them. If the author does not reply within the next week, then the issue will be marked as stale and closed. The original author may still reopen the issue at any time -**Close Potential Spam Issues**
[![issue-spam-control.yml](https://github.com/Lissy93/dashy/actions/workflows/issue-spam-control.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/issue-spam-control.yml) | Auto-closes issues, and adds a comment if it was submitted by a user who hasn't yet interacted with the repo, is new to GitHub and has not starred the repository. The comment will advise them to check their issue is complete, and then allow them to reopen it -**Issue Translator**
[![issue-translator.yml](https://github.com/Lissy93/dashy/actions/workflows/issue-translator.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/issue-translator.yml) | Auto-translates any comments and issues that were written in any language other than English, and posts the translation as a comment below -**Label Sponsors**
[![label-sponsors.yml](https://github.com/Lissy93/dashy/actions/workflows/label-sponsors.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/label-sponsors.yml) | Adds a special label to any issues or pull requests raised by users who are sponsoring the project via GitHub, so that they can get priority support -**LGTM Comment**
[![lgtm-comment.yml](https://github.com/Lissy93/dashy/actions/workflows/lgtm-comment.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/lgtm-comment.yml) | When a PR review contains the words LGTM (looks good to me), the Liss-Bot will reply with a random celebratory or thumbs up GIF, just as a bit of fun -**Mind your Language**
[![mind-your-language.yml](https://github.com/Lissy93/dashy/actions/workflows/mind-your-language.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/mind-your-language.yml) | Replies to any comment (on issue or PR) that contains profanities, offensive or inappropriate language with a polite note reminding the user of the code of conduct -**Release Notifier**
[![release-commenter.yml](https://github.com/Lissy93/dashy/actions/workflows/release-commenter.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/release-commenter.yml) | Once a release has been published which fixes an issue, a comment will be added to the relevant issues informing the user who raised it that it was fixed in the current release -**Update Issue after Merge**
[![update-issue-after-pr.yml](https://github.com/Lissy93/dashy/actions/workflows/update-issue-after-pr.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/update-issue-after-pr.yml) | After a PR which fixes an issue is merged, Liss-Bot will add a comment to said issue based on the git commit message -**Auto Add Comment Based on Tag**
[![add-comment-from-tag.yml](https://github.com/Lissy93/dashy/actions/workflows/add-comment-from-tag.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/add-comment-from-tag.yml) | Will add comment with useful info to certain issues, based on the tag applied +**Close Stale Issues**
[![close-stale-issues.yml](https://github.com/Lissy93/dashy/actions/workflows/close-stale-issues.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/close-stale-issues.yml) | Issues which have not been updated for a long time will have a comment posted to them. If the author does not reply, the issue will be marked as stale and closed. Also handles issues awaiting user response and pings the maintainer when needed -### PR Management +### Documentation Action | Description --- | --- -**PR Commenter**
[![pr-commenter.yml](https://github.com/Lissy93/dashy/actions/workflows/pr-commenter.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/pr-commenter.yml) | Adds comment with helpful info to pull requests, based on which files have been changes -**Issue from Todo Code**
[![raise-issue-from-todo.yml](https://github.com/Lissy93/dashy/actions/workflows/raise-issue-from-todo.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/raise-issue-from-todo.yml) | When a `todo` note is found in the code after a PR, then Liss-Bot will automatically raise an issue, so that the todo can be addressed/ implemented. The issue will be closed once the todo has been implemented or removed +**Wiki Sync**
[![wiki-sync.yml](https://github.com/Lissy93/dashy/actions/workflows/wiki-sync.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/wiki-sync.yml) | Publishes the repository wiki from the markdown files in the docs directory. Runs weekly and on manual dispatch +**Update Docs Site**
[![update-docs-site.yml](https://github.com/Lissy93/dashy/actions/workflows/update-docs-site.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/update-docs-site.yml) | When docs change on master, copies them to the website branch and processes them for the docs site +**Build Docs Site**
[![build-docs-site.yml](https://github.com/Lissy93/dashy/actions/workflows/build-docs-site.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/build-docs-site.yml) | Builds and deploys the documentation website from the WEBSITE/docs-site-source branch -### Documentation & Reports +### Other Action | Description --- | --- -**Generate Credits**
[![generate-credits.yml](https://github.com/Lissy93/dashy/actions/workflows/generate-credits.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/generate-credits.yml) | Generates a report, including contributors, collaborators, sponsors, bots and helpful users. Will then insert a markdown table with thanks to these GitHub users and links to their profiles into the Credits page, as well as a summary of sponsors and top contributors into the main readme -**Wiki Sync**
[![wiki-sync.yml](https://github.com/Lissy93/dashy/actions/workflows/wiki-sync.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/wiki-sync.yml) | Generates and publishes the repositories wiki page using the markdown files within the docs directory +**Mirror to Codeberg**
[![mirror.yml](https://github.com/Lissy93/dashy/actions/workflows/mirror.yml/badge.svg)](https://github.com/Lissy93/dashy/actions/workflows/mirror.yml) | Pushes a copy of the repo to Codeberg weekly and on manual dispatch + +--- + +## Release Pipeline + +```mermaid +flowchart TD + A[PR opened] --> B[CI checks run\nlint, test, build, Docker smoke, security] + B --> C{Checks pass?} + C -- No --> D[PR blocked] + C -- Yes --> R[Maintainers review] + R --> E[PR merged into master] + + E --> F{Code files changed?} + F -- No --> G[No action] + F -- Yes --> H{Version already\nbumped in PR?} + H -- Yes --> I[Use existing version] + H -- No --> J[Auto bump patch version] + J --> I + + I --> K[Create git tag] + K --> L[Docker build + publish\namd64, arm64, arm/v7] + K --> M{Major or minor bump?} + M -- Yes --> N[Draft GitHub release] + M -- No --> O[Skip release] +``` --- diff --git a/package.json b/package.json index 8c239b90..fdc1e987 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dashy", - "version": "3.1.1", + "version": "3.1.3", "license": "MIT", "main": "server", "author": "Alicia Sykes (https://aliciasykes.com)", @@ -9,6 +9,10 @@ "dev": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve", "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", "lint": "vue-cli-service lint", + "test": "vitest run", + "test:watch": "vitest", + "test:ui": "vitest --ui", + "test:coverage": "vitest run --coverage", "pm2-start": "npx pm2 start server.js", "build-watch": "vue-cli-service build --watch --mode production", "build-and-start": "NODE_OPTIONS=--openssl-legacy-provider npm-run-all --parallel build start", @@ -17,7 +21,7 @@ "dependency-audit": "npx improved-yarn-audit --ignore-dev-deps" }, "dependencies": { - "@babel/core": "^7.0.0", + "@babel/core": "^7.26.0", "@formschema/native": "^2.0.0-beta.6", "@sentry/tracing": "^7.102.1", "@sentry/vue": "^7.102.1", @@ -25,7 +29,8 @@ "axios": "^1.12.0", "connect-history-api-fallback": "^1.6.0", "crypto-js": "^4.2.0", - "express": "^4.17.2", + "dompurify": "^3.0.8", + "express": "^4.21.0", "express-basic-auth": "^1.2.1", "frappe-charts": "^1.6.2", "js-yaml": "^4.1.0", @@ -50,22 +55,27 @@ "vuex": "^3.6.2" }, "devDependencies": { - "@babel/preset-env": "^7.17.10", - "@vue/cli-plugin-babel": "^4.5.15", - "@vue/cli-plugin-eslint": "^4.5.15", - "@vue/cli-plugin-pwa": "^4.5.15", + "@babel/preset-env": "^7.26.0", + "@vitest/ui": "^1.6.0", + "@vue/cli-plugin-babel": "^5.0.8", + "@vue/cli-plugin-eslint": "^5.0.8", + "@vue/cli-plugin-pwa": "^5.0.8", "@vue/cli-plugin-typescript": "^5.0.8", - "@vue/cli-service": "^4.5.19", + "@vue/cli-service": "^5.0.8", + "@babel/eslint-parser": "^7.25.0", "@vue/eslint-config-standard": "^4.0.0", - "babel-eslint": "^10.0.1", + "@vue/test-utils": "^1.3.6", "copy-webpack-plugin": "6.4.0", - "eslint": "^6.8.0", + "eslint": "^7.32.0", "eslint-config-airbnb": "^18.0.1", "eslint-plugin-vue": "^7.9.0", + "happy-dom": "^17.4.0", "npm-run-all": "^4.1.5", - "sass": "^1.38.0", - "sass-loader": "^7.1.0", + "sass": "^1.77.0", + "sass-loader": "^12.0.0", "typescript": "^5.4.4", + "vite-plugin-vue2": "^2.0.3", + "vitest": "^1.6.0", "vue-cli-plugin-yaml": "^1.0.2", "vue-svg-loader": "^0.16.0", "vue-template-compiler": "^2.7.0" @@ -90,12 +100,26 @@ "no-else-return": 0 }, "parserOptions": { - "parser": "babel-eslint" - } + "parser": "@babel/eslint-parser" + }, + "overrides": [ + { + "files": [ + "tests/**", + "vitest.config.js" + ], + "rules": { + "import/no-extraneous-dependencies": "off", + "no-undef": "off", + "global-require": "off", + "no-unused-vars": "off" + } + } + ] }, "babel": { "presets": [ - "@vue/app", + "@vue/cli-plugin-babel/preset", "@babel/preset-env" ] }, @@ -107,5 +131,19 @@ "browserslist": [ "> 1%", "last 2 versions" - ] + ], + "resolutions": { + "ejs": "^3.1.10", + "loader-utils": "^2.0.4", + "minimatch": "^3.1.2", + "braces": "^3.0.3", + "micromatch": "^4.0.8", + "serialize-javascript": "^6.0.2", + "node-forge": "^1.3.1", + "nth-check": "^2.1.1", + "ip": "^2.0.1", + "postcss": "^8.4.31", + "tar": "^6.2.1" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/public/index.html b/public/index.html index ceb16a49..387947af 100644 --- a/public/index.html +++ b/public/index.html @@ -12,6 +12,7 @@ + Dashy diff --git a/public/theme-fonts.css b/public/theme-fonts.css new file mode 100644 index 00000000..aaacfabf --- /dev/null +++ b/public/theme-fonts.css @@ -0,0 +1,44 @@ +/* Optional fonts for specific themes, served statically from public/ */ + +@font-face { + font-family: 'Cutive Mono'; + src: url('/fonts/CutiveMono-Regular.ttf'); +} +@font-face { + font-family: 'Francois One'; + src: url('/fonts/FrancoisOne-Regular.ttf'); +} +@font-face { + font-family: 'Podkova'; + src: url('/fonts/Podkova-Medium.ttf'); +} +@font-face { + font-family: 'Roboto'; + src: url('/fonts/Roboto-Light.ttf'); +} +@font-face { + font-family: 'Sniglet'; + src: url('/fonts/Sniglet-Regular.ttf'); +} +@font-face { + font-family: 'VT323'; + src: url('/fonts/VT323-Regular.ttf'); +} +@font-face { + font-family: 'Audiowide'; + src: url('/fonts/Audiowide-Regular.ttf'); +} +@font-face { + font-family: 'Shrikhand'; + src: url('/fonts/Shrikhand-Regular.ttf'); +} +@font-face { + font-family: 'Digital'; + src: url('/fonts/Digital-Regular.ttf'); +} +@font-face { + font-family: 'OpenWeatherIcons'; + src: url('/widget-resources/WeatherIcons.woff2'); + font-style: normal; + font-weight: 400; +} diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index adb9319d..e257b64e 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -379,7 +379,8 @@ "post-code": "Post Code", "location": "Location", "timezone": "Timezone", - "organization": "Organization" + "organization": "Organization", + "forwarded-port": "Forwarded Port" }, "nextcloud": { "active": "active", diff --git a/src/components/Widgets/Clock.vue b/src/components/Widgets/Clock.vue index f7a22bd1..a5f53b02 100644 --- a/src/components/Widgets/Clock.vue +++ b/src/components/Widgets/Clock.vue @@ -85,10 +85,6 @@ export default {