diff --git a/.github/DISCUSSION_TEMPLATE/feature-requests.yml b/.github/DISCUSSION_TEMPLATE/feature-requests.yml deleted file mode 100644 index 96e5ef2a5bd..00000000000 --- a/.github/DISCUSSION_TEMPLATE/feature-requests.yml +++ /dev/null @@ -1,15 +0,0 @@ -title: "[Feature Request] " -labels: ["enhancement"] -body: - - type: textarea - id: description - attributes: - label: Description - description: A clear and concise description of what you would like to see. - validations: - required: true - - type: textarea - id: other - attributes: - label: Other - description: Add any other context or information about the feature request here. diff --git a/.github/DISCUSSION_TEMPLATE/support.yml b/.github/DISCUSSION_TEMPLATE/support.yml deleted file mode 100644 index 2493df22984..00000000000 --- a/.github/DISCUSSION_TEMPLATE/support.yml +++ /dev/null @@ -1,56 +0,0 @@ -body: - - type: markdown - attributes: - value: | - ### ⚠️ Before opening a discussion: - - - [Check the troubleshooting guide](https://gethomepage.dev/troubleshooting/). - - [Search existing issues](https://github.com/gethomepage/homepage/search?q=&type=issues) [and discussions](https://github.com/gethomepage/homepage/search?q=&type=discussions) (including closed ones!). - - type: textarea - id: description - attributes: - label: Description - description: A clear and concise description of the issue or question. If applicable, add screenshots to help explain your problem. - validations: - required: true - - type: input - id: version - attributes: - label: homepage version - placeholder: e.g. v0.4.18 (4ea2798) - validations: - required: true - - type: dropdown - id: install-method - attributes: - label: Installation method - options: - - Docker - - Unraid - - Source - - Other (please describe above) - validations: - required: true - - type: textarea - id: config - attributes: - label: Configuration - description: Please provide any relevant service, widget or otherwise related configuration here - render: yaml - - type: textarea - id: container-logs - attributes: - label: Container Logs - description: Please review and provide any logs from the container, if relevant - - type: textarea - id: browser-logs - attributes: - label: Browser Logs - description: Please review and provide any logs from the browser, if relevant - - type: textarea - id: troubleshooting - attributes: - label: Troubleshooting - description: Please include output from your [troubleshooting tests](https://gethomepage.dev/more/troubleshooting/#service-widget-errors), if relevant. - validations: - required: true diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 39bfee33711..00000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -github: [gethomepage] -open_collective: homepage -patreon: gethomepage diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index b799d3e43a5..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: 🐛 Bug report -description: Please only raise an issue if you've been advised to do so in a GitHub discussion. Thanks! 🙏 -labels: ["bug"] -body: - - type: markdown - attributes: - value: | - ## ⚠️ Please note - The starting point for a bug report should always be a [GitHub discussion](https://github.com/gethomepage/homepage/discussions/new?category=support) - Thank you for contributing to homepage! ✊ - - type: checkboxes - id: pre-flight - attributes: - label: Before submitting, please confirm the following - options: - - label: I confirm this was discussed, and the maintainers asked that I open an issue. - required: true - - label: I am aware that if I create this issue without a discussion, it will be removed without a response. - required: true - - type: input - id: discussion - attributes: - label: Discussion Link - description: | - Please link to the GitHub discussion that led to this issue. - validations: - required: true - - type: textarea - id: additional - attributes: - label: Additional context - description: Optional - render: Text diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 22d29ff5e35..00000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,11 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: 🤔 Questions and Help - url: https://github.com/gethomepage/homepage/discussions - about: For support, possible bug reports or general questions. - - name: 💬 Chat - url: https://discord.gg/k4ruYNrudu - about: Want to discuss homepage with others? Check out our chat. - - name: 🚀 Feature Request - url: https://github.com/gethomepage/homepage/discussions/new?category=feature-requests - about: Remember to search for existing feature requests and "up-vote" any you like diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1d9e6243b50..00000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,31 +0,0 @@ -## Proposed change - - - -Closes # (issue) - -## Type of change - - - -- [ ] New service widget -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Documentation only -- [ ] Other (please explain) - -## Checklist: - -- [ ] If applicable, I have added corresponding documentation changes. -- [ ] If applicable, I have reviewed the [feature](https://gethomepage.dev/more/development/#new-feature-guidelines) and / or [service widget guidelines](https://gethomepage.dev/more/development/#service-widget-guidelines). -- [ ] I have checked that all code style checks pass using [pre-commit hooks](https://gethomepage.dev/more/development/#code-formatting-with-pre-commit-hooks) and [linting checks](https://gethomepage.dev/more/development/#code-linting). -- [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers. diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index ba1b1fb022f..00000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "monthly" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..23daba484f5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: build +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_PASS }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + run: | + REPOS="\ + ${{ secrets.DOCKERHUB_USER }}/riscv-homepage \ + ghcr.io/${{ github.repository }} \ + " ./build-docker-riscv.sh diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml deleted file mode 100644 index f3c90cf37da..00000000000 --- a/.github/workflows/crowdin.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Crowdin Action - -on: - workflow_dispatch: - schedule: - - cron: '2 */12 * * *' - push: - paths: [ - '/public/locales/en/**', - ] - branches: [ dev ] - -jobs: - synchronize-with-crowdin: - name: Crowdin Sync - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: crowdin action - uses: crowdin/github-action@v2 - with: - upload_translations: false - download_translations: true - crowdin_branch_name: dev - localization_branch_name: l10n_dev - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index 2ac8b3e8a53..00000000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: Docker - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -on: - schedule: - - cron: '20 0 * * *' - push: - branches: - - main - - feature/** - - dev - # Publish semver tags as releases. - tags: [ 'v*.*.*' ] - paths-ignore: - - 'docs/**' - - 'mkdocs.yml' - pull_request: - branches: [ "dev" ] - paths-ignore: - - 'docs/**' - - 'mkdocs.yml' - merge_group: - -env: - # github.repository as / - IMAGE_NAME: ${{ github.repository }} - - -jobs: - pre-commit: - name: Linting Checks - runs-on: ubuntu-22.04 - steps: - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install python - uses: actions/setup-python@v5 - with: - python-version: 3.x - - - name: Check files - uses: pre-commit/action@v3.0.1 - - build: - name: Docker Build & Push - if: github.repository == 'gethomepage/homepage' - runs-on: self-hosted - needs: - - pre-commit - permissions: - contents: read - packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Setup QEMU - # https://github.com/marketplace/actions/docker-setup-buildx#with-qemu - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v3 - - # This step is being disabled because the runner is on a self-hosted machine - # where the cache will stick between runs. - # - name: Cache Docker layers - # uses: actions/cache@v3 - # with: - # path: /tmp/.buildx-cache - # key: ${{ runner.os }}-buildx-${{ github.sha }} - # restore-keys: | - # ${{ runner.os }}-buildx- - - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Login to Docker Hub - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - # Extract metadata (tags, labels) for Docker - # https://github.com/docker/metadata-action - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ${{ env.IMAGE_NAME }} - ghcr.io/${{ env.IMAGE_NAME }} - flavor: | - latest=auto - - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v6 - with: - context: . - push: ${{ github.event_name != 'pull_request' && !(github.event_name == 'push' && startsWith(github.ref, 'refs/heads/feature')) }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - build-args: | - BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} - VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} - REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} - # https://github.com/docker/setup-qemu-action#about - # platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml deleted file mode 100644 index def1ee1e220..00000000000 --- a/.github/workflows/docs-publish.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Docs - -on: - push: - tags: ["v*.*.*"] - branches: ["main"] - paths: - - "docs/**" - - "mkdocs.yml" - pull_request: - paths: - - "docs/**" - - "mkdocs.yml" - merge_group: - workflow_dispatch: - -permissions: - contents: write - -jobs: - pre-commit: - name: Linting Checks - runs-on: ubuntu-22.04 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install python - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Check files - uses: pre-commit/action@v3.0.1 - - test: - name: Test Build - if: github.repository == 'gethomepage/homepage' && github.event_name == 'pull_request' - runs-on: ubuntu-latest - needs: - - pre-commit - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - run: sudo apt-get install pngquant - - run: pip install mkdocs-material mkdocs-redirects "mkdocs-material[imaging]" - - name: Test Docs Build - run: MKINSIDERS=false mkdocs build - deploy: - name: Build & Deploy - if: github.repository == 'gethomepage/homepage' && github.event_name != 'pull_request' - runs-on: ubuntu-latest - needs: - - pre-commit - steps: - - uses: actions/checkout@v4 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: echo "cache_id=${{github.sha}}" >> $GITHUB_ENV - - uses: actions/cache@v4 - with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - run: sudo apt-get install pngquant - - run: pip install git+https://${GH_TOKEN}@github.com/benphelps/mkdocs-material-insiders.git - - run: pip install mkdocs-redirects "mkdocs-material[imaging]" - - name: Docs Deploy - run: MKINSIDERS=true mkdocs gh-deploy --force -env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/reaction-comments.yml b/.github/workflows/reaction-comments.yml deleted file mode 100644 index f3a0e67d892..00000000000 --- a/.github/workflows/reaction-comments.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'Reaction Comments' - -on: - issue_comment: - types: [created, edited] - pull_request_review_comment: - types: [created, edited] - schedule: - - cron: '0 0 * * *' - -permissions: - actions: write - issues: write - pull-requests: write - -jobs: - action: - runs-on: ubuntu-latest - steps: - - uses: dessant/reaction-comments@v4 diff --git a/.github/workflows/repo-maintenance.yml b/.github/workflows/repo-maintenance.yml deleted file mode 100644 index 7cf47c51bb5..00000000000 --- a/.github/workflows/repo-maintenance.yml +++ /dev/null @@ -1,280 +0,0 @@ -name: 'Repository Maintenance' - -on: - schedule: - - cron: '0 3 * * *' - workflow_dispatch: - -permissions: - issues: write - pull-requests: write - discussions: write - -concurrency: - group: lock - -jobs: - stale: - name: 'Stale' - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - days-before-stale: 7 - days-before-close: 14 - stale-issue-label: stale - stale-pr-label: stale - stale-issue-message: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. See our [contributing guidelines](https://github.com/gethomepage/homepage/blob/main/CONTRIBUTING.md#automatic-respoistory-maintenance) for more details. - lock-threads: - name: 'Lock Old Threads' - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v5 - with: - issue-inactive-days: '30' - pr-inactive-days: '30' - discussion-inactive-days: '30' - log-output: true - issue-comment: > - This issue has been automatically locked since there - has not been any recent activity after it was closed. - Please open a new discussion for related concerns. - See our [contributing guidelines](https://github.com/gethomepage/homepage/blob/main/CONTRIBUTING.md#automatic-repository-maintenance) for more details. - pr-comment: > - This pull request has been automatically locked since there - has not been any recent activity after it was closed. - Please open a new discussion for related concerns. - See our [contributing guidelines](https://github.com/gethomepage/homepage/blob/main/CONTRIBUTING.md#automatic-repository-maintenance) for more details. - discussion-comment: > - This discussion has been automatically locked since there - has not been any recent activity after it was closed. - Please open a new discussion for related concerns. - See our [contributing guidelines](https://github.com/gethomepage/homepage/blob/main/CONTRIBUTING.md#automatic-repository-maintenance) for more details. - close-answered-discussions: - name: 'Close Answered Discussions' - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - script: | - function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - const query = `query($owner:String!, $name:String!) { - repository(owner:$owner, name:$name){ - discussions(first:100, answered:true, states:[OPEN]) { - nodes { - id, - number - } - } - } - }`; - const variables = { - owner: context.repo.owner, - name: context.repo.repo, - } - const result = await github.graphql(query, variables) - - console.log(`Found ${result.repository.discussions.nodes.length} open answered discussions`) - - for (const discussion of result.repository.discussions.nodes) { - console.log(`Closing discussion #${discussion.number} (${discussion.id})`) - - const addCommentMutation = `mutation($discussion:ID!, $body:String!) { - addDiscussionComment(input:{discussionId:$discussion, body:$body}) { - clientMutationId - } - }`; - const commentVariables = { - discussion: discussion.id, - body: 'This discussion has been automatically closed because it was marked as answered. See our [contributing guidelines](https://github.com/gethomepage/homepage/blob/main/CONTRIBUTING.md#automatic-repository-maintenance) for more details.', - } - await github.graphql(addCommentMutation, commentVariables) - - const closeDiscussionMutation = `mutation($discussion:ID!, $reason:DiscussionCloseReason!) { - closeDiscussion(input:{discussionId:$discussion, reason:$reason}) { - clientMutationId - } - }`; - const closeVariables = { - discussion: discussion.id, - reason: "RESOLVED", - } - await github.graphql(closeDiscussionMutation, closeVariables) - - await sleep(1000) - } - close-outdated-discussions: - name: 'Close Outdated Discussions' - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - script: | - function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - const CUTOFF_DAYS = 180; - const cutoff = new Date(); - cutoff.setDate(cutoff.getDate() - CUTOFF_DAYS); - - const query = `query( - $owner:String!, - $name:String!, - $supportCategory:ID!, - $generalCategory:ID!, - ) { - supportDiscussions: repository(owner:$owner, name:$name){ - discussions( - categoryId:$supportCategory, - last:50, - answered:false, - states:[OPEN], - ) { - nodes { - id, - number, - updatedAt - } - }, - }, - generalDiscussions: repository(owner:$owner, name:$name){ - discussions( - categoryId:$generalCategory, - last:50, - states:[OPEN], - ) { - nodes { - id, - number, - updatedAt - } - } - } - }`; - const variables = { - owner: context.repo.owner, - name: context.repo.repo, - supportCategory: "DIC_kwDOH31rQM4CRErR", - generalCategory: "DIC_kwDOH31rQM4CRErQ" - } - const result = await github.graphql(query, variables); - const combinedDiscussions = [ - ...result.supportDiscussions.discussions.nodes, - ...result.generalDiscussions.discussions.nodes, - ] - - console.log(`Checking ${combinedDiscussions.length} open discussions`); - - for (const discussion of combinedDiscussions) { - if (new Date(discussion.updatedAt) < cutoff) { - console.log(`Closing outdated discussion #${discussion.number} (${discussion.id}), last updated at ${discussion.updatedAt}`); - const addCommentMutation = `mutation($discussion:ID!, $body:String!) { - addDiscussionComment(input:{discussionId:$discussion, body:$body}) { - clientMutationId - } - }`; - const commentVariables = { - discussion: discussion.id, - body: 'This discussion has been automatically closed due to inactivity. See our [contributing guidelines](https://github.com/gethomepage/homepage/blob/main/CONTRIBUTING.md#automatic-repository-maintenance) for more details.', - } - await github.graphql(addCommentMutation, commentVariables); - - const closeDiscussionMutation = `mutation($discussion:ID!, $reason:DiscussionCloseReason!) { - closeDiscussion(input:{discussionId:$discussion, reason:$reason}) { - clientMutationId - } - }`; - const closeVariables = { - discussion: discussion.id, - reason: "OUTDATED", - } - await github.graphql(closeDiscussionMutation, closeVariables); - - await sleep(1000); - } - } - close-unsupported-feature-requests: - name: 'Close Unsupported Feature Requests' - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - script: | - function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - const CUTOFF_1_DAYS = 180; - const CUTOFF_1_COUNT = 5; - const CUTOFF_2_DAYS = 365; - const CUTOFF_2_COUNT = 10; - - const cutoff1Date = new Date(); - cutoff1Date.setDate(cutoff1Date.getDate() - CUTOFF_1_DAYS); - const cutoff2Date = new Date(); - cutoff2Date.setDate(cutoff2Date.getDate() - CUTOFF_2_DAYS); - - const query = `query( - $owner:String!, - $name:String!, - $featureRequestsCategory:ID!, - ) { - repository(owner:$owner, name:$name){ - discussions( - categoryId:$featureRequestsCategory, - last:100, - states:[OPEN], - ) { - nodes { - id, - number, - updatedAt, - upvoteCount, - } - }, - } - }`; - const variables = { - owner: context.repo.owner, - name: context.repo.repo, - featureRequestsCategory: "DIC_kwDOH31rQM4CRErS" - } - const result = await github.graphql(query, variables); - - for (const discussion of result.repository.discussions.nodes) { - const discussionDate = new Date(discussion.updatedAt); - if ((discussionDate < cutoff1Date && discussion.upvoteCount < CUTOFF_1_COUNT) || - (discussionDate < cutoff2Date && discussion.upvoteCount < CUTOFF_2_COUNT)) { - console.log(`Closing discussion #${discussion.number} (${discussion.id}), last updated at ${discussion.updatedAt} with votes ${discussion.upvoteCount}`); - const addCommentMutation = `mutation($discussion:ID!, $body:String!) { - addDiscussionComment(input:{discussionId:$discussion, body:$body}) { - clientMutationId - } - }`; - const commentVariables = { - discussion: discussion.id, - body: 'This discussion has been automatically closed due to lack of community support. See our [contributing guidelines](https://github.com/gethomepage/homepage/blob/main/CONTRIBUTING.md#automatic-repository-maintenance) for more details.', - } - await github.graphql(addCommentMutation, commentVariables); - - const closeDiscussionMutation = `mutation($discussion:ID!, $reason:DiscussionCloseReason!) { - closeDiscussion(input:{discussionId:$discussion, reason:$reason}) { - clientMutationId - } - }`; - const closeVariables = { - discussion: discussion.id, - reason: "OUTDATED", - } - await github.graphql(closeDiscussionMutation, closeVariables); - - await sleep(1000); - } - } diff --git a/Dockerfile b/Dockerfile index 3e6de75687b..382151a3863 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax = docker/dockerfile:latest # Install dependencies only when needed -FROM docker.io/node:18-alpine AS deps +FROM ghcr.io/unofficial-docker-for-riscv/baseimage-node:lts-alpine AS deps WORKDIR /app @@ -17,7 +17,7 @@ RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm f RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm install -r --offline # Rebuild the source code only when needed -FROM docker.io/node:18-alpine AS builder +FROM ghcr.io/unofficial-docker-for-riscv/baseimage-node:lts-alpine AS builder WORKDIR /app ARG BUILDTIME @@ -33,7 +33,7 @@ RUN npm run telemetry \ && NEXT_PUBLIC_BUILDTIME=$BUILDTIME NEXT_PUBLIC_VERSION=$VERSION NEXT_PUBLIC_REVISION=$REVISION npm run build # Production image, copy all the files and run next -FROM docker.io/node:18-alpine AS runner +FROM ghcr.io/unofficial-docker-for-riscv/baseimage-node:lts-alpine AS runner LABEL org.opencontainers.image.title "Homepage" LABEL org.opencontainers.image.description "A self-hosted services landing page, with docker and service integrations." LABEL org.opencontainers.image.url="https://github.com/gethomepage/homepage" diff --git a/build-docker-riscv.sh b/build-docker-riscv.sh new file mode 100755 index 00000000000..02a2b63b6b7 --- /dev/null +++ b/build-docker-riscv.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# DO NOT UPSTREAM THIS FILE + +VERSION=$(cat ./package.json | jq -r .version) + +REPOS=(${REPOS:-ngc7331/riscv-homepage}) +TAGS=() +for repo in ${REPOS[@]}; do + TAGS+=("-t ${repo,,}:${VERSION}") + TAGS+=("-t ${repo,,}:latest") +done + +docker buildx build \ + ${TAGS[@]} \ + --push \ + --platform linux/riscv64 \ + -f Dockerfile .