diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 07f010861..5097b8569 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -31,6 +31,8 @@ body: label: Version description: What version of Homarr are you running? options: + # The below comment is used to insert a new version with on-release.yml + #NEXT_VERSION# - 1.33.0 - 1.32.0 - 1.31.0 diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml new file mode 100644 index 000000000..83357cafe --- /dev/null +++ b/.github/workflows/on-release.yml @@ -0,0 +1,82 @@ +permissions: {} + +on: + release: + types: [published] + +jobs: + trigger-docs-release: + name: Trigger Documentation Release + runs-on: ubuntu-latest + steps: + - name: Obtain token + id: obtainToken + uses: tibdex/github-app-token@v2 + with: + private_key: ${{ secrets.HOMARR_DOCS_RELEASE_APP_PRIVATE_KEY }} + app_id: ${{ vars.HOMARR_DOCS_RELEASE_APP_ID }} + installation_retrieval_mode: repository + installation_retrieval_payload: homarr-labs/documentation + - name: Trigger documentation release + env: + GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }} + SOURCE_TAG: ${{ github.event.release.tag_name }} + run: | + curl -X POST \ + -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/homarr-labs/documentation/dispatches \ + -d @- <1.0.0 | :white_check_mark: | -| <1.0.0 | :x: | +We only fix security issues in the [latest stable version](https://github.com/homarr-labs/homarr/releases/latest). Meaning security issues in prior versions will not be fixed and users have to upgrade to the latest version to receive them. ## Reporting a Vulnerability + We use [GitHub's system for reporting vulnerabilities](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-advisories/working-with-repository-security-advisories/creating-a-repository-security-advisory). Click [**here to report an advisory**](https://github.com/homarr-labs/homarr/security/advisories/new). Our team will get notified and will get back to you within 1-6 business days. diff --git a/package.json b/package.json index e53847e2c..b265fb9fd 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,14 @@ "lint:ws": "pnpm dlx sherif@latest", "package:new": "turbo gen init", "release": "semantic-release", + "scripts:update-bug-report-template": "tsx ./scripts/update-bug-report-template.mts", + "scripts:update-readme-integrations": "tsx ./scripts/update-integration-list.mts", "start": "concurrently \"pnpm with-env node apps/tasks/tasks.cjs\" \"pnpm with-env node apps/websocket/wssServer.cjs\" \"pnpm -F nextjs start\"", "test": "cross-env NODE_ENV=development CI=true vitest run --exclude e2e --coverage.enabled ", "test:e2e": "cross-env NODE_ENV=development CI=true vitest e2e", "test:ui": "cross-env NODE_ENV=development CI=true vitest --exclude e2e --ui --coverage.enabled", "typecheck": "turbo typecheck", - "with-env": "dotenv -e .env --", - "scripts:update-readme-integrations": "tsx ./scripts/update-integration-list.mts" + "with-env": "dotenv -e .env --" }, "prettier": "@homarr/prettier-config", "devDependencies": { diff --git a/scripts/update-bug-report-template.mts b/scripts/update-bug-report-template.mts new file mode 100644 index 000000000..3a015a322 --- /dev/null +++ b/scripts/update-bug-report-template.mts @@ -0,0 +1,14 @@ +import { readFile, writeFile } from "fs/promises"; + +const replaceTemplate = "#NEXT_VERSION#"; +const fileName = ".github/ISSUE_TEMPLATE/bug_report.yml"; +const env = { + NEXT_VERSION: process.env.NEXT_VERSION as string, +}; + +const content = await readFile(fileName, "utf8"); +const updatedContent = content.replace( + replaceTemplate, + `${replaceTemplate}\n - ${env.NEXT_VERSION.replace("v", "")}`, +); +await writeFile(fileName, updatedContent, "utf8");