diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml new file mode 100644 index 0000000..c484b1e --- /dev/null +++ b/.github/workflows/lint-info-xml.yml @@ -0,0 +1,34 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +# SPDX-License-Identifier: MIT + +name: Lint info.xml + +on: + workflow_call: + +permissions: + contents: read + +jobs: + xml-linters: + name: info.xml lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + sparse-checkout: | + appinfo/ + + - name: Download schema + run: >- + wget + https://raw.githubusercontent.com/nextcloud/appstore/c8fe8dcb388d2ed7b566e982fd64aa38463ba80a/nextcloudappstore/api/v1/release/info.xsd + + - name: Lint info.xml + uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2 + with: + xml-file: ./appinfo/info.xml + xml-schema-file: ./info.xsd diff --git a/workflow-templates/lint-info-xml.properties.json b/workflow-templates/lint-info-xml.properties.json new file mode 100644 index 0000000..7fab906 --- /dev/null +++ b/workflow-templates/lint-info-xml.properties.json @@ -0,0 +1,11 @@ +{ + "name": "Lint info.xml", + "description": "Validate a Nextcloud app's appinfo/info.xml against the App Store schema.", + "iconName": "octicon codescan", + "categories": [ + "XML" + ], + "filePatterns": [ + "^appinfo/info.xml$" + ] +} diff --git a/workflow-templates/lint-info-xml.properties.json.license b/workflow-templates/lint-info-xml.properties.json.license new file mode 100644 index 0000000..1ce4e0c --- /dev/null +++ b/workflow-templates/lint-info-xml.properties.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/workflow-templates/lint-info-xml.yml b/workflow-templates/lint-info-xml.yml new file mode 100644 index 0000000..e0372e1 --- /dev/null +++ b/workflow-templates/lint-info-xml.yml @@ -0,0 +1,16 @@ +# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +# SPDX-License-Identifier: AGPL-3.0-or-later + +# This workflow is published through the LibreCode organization catalog. +# Implementation: LibreCodeCoop/github-workflows + +name: Lint info.xml + +on: pull_request + +permissions: + contents: read + +jobs: + lint-info-xml: + uses: LibreCodeCoop/github-workflows/.github/workflows/lint-info-xml.yml@c5f578281fa7d270b839866ebc07047287ff50d8