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
-
-
+Dashy is kindly sponsored by SSD Nodes - Affordable VPS hosting for self-hosters
+
+
Dashy is kindly sponsored by Umbrel - the personal home cloud and OS for self-hosting
-
+
+Dashy is kindly sponsored by TestMu AI - The worldโs first full-stack Agentic AI Quality Engineering platform
+
+
+
+