GitHub Actions workflow templates for Nextcloud apps
The workflow templates of ncmake. make workflows-install copies a template into .github/workflows of an app and records it, and the workflow updater keeps it current there. Dependabot keeps the actions of the templates current in this repository.
Each template is workflows/<name>.yml, with its name and description in workflows/<name>.properties.json next to it.
Tip
📖 The documentation lives in the ncmake wiki. This page is the short version.
| Template | Name | Description |
|---|---|---|
backport |
ncmake backport | Apply a pull request's change to a maintenance branch on a "/backport to" comment and open a verified, signed-off pull request there; on an open pull request it runs at the merge |
branch-cleanup |
ncmake branch cleanup | Delete a merged pull request's head branch if it still exists (a portable, workflow-shipped equivalent of the repository "Automatically delete head branches" setting) |
deps-updater |
ncmake deps update | Run make deps-audit FIX=1 of ncmake every day on every stable* branch, where Dependabot opens no security updates and its version updates of npm reach the direct dependencies only, and open a pull request for each branch where that updated a lock file; it names package, locked and fixed version, never the advisory text |
github-changes |
ncmake GitHub changes | Read the GitHub changelog four times a day and open an issue for an entry that retires something in Actions or, unless it is a release or an improvement, names an event, an action or a runner label of the workflows the repository maintains itself (unmanaged ones, .ncmake/workflows/ and templates); one issue per entry, labelled github-change, with the link and what it names where |
install-test |
Install test | Run make build and make install-test of ncmake: the staged app installed, enabled and used on the Nextcloud server images of the lowest and the highest major it declares, with its PHPUnit suite against them; a finding worth changing fails, the report goes to the job summary and what each run left to an artifact, and a repository without appinfo/info.xml passes |
lint-actions |
Lint actions | Run make lint-actions of the ncmake lint module: actionlint over every tracked GitHub Actions workflow (.github/workflows/, an app's .ncmake/workflows/ folder and templates next to a properties.json) with shellcheck over the run: scripts, with the repository's own configuration when it has one and otherwise the self-hosted runners of Nextcloud as known labels; a repository without workflows passes, the report goes to the job summary |
lint-actions-security |
Lint actions security | Run make lint-actions-security of the ncmake lint module: zizmor offline over every tracked GitHub Actions workflow and action.yml, with the repository's own zizmor.yml when it has one; findings of medium severity and above fail, the report goes to the job summary, and ZIZMOR_CODE_SCANNING=true uploads the findings to code scanning |
lint-autoloader |
Lint autoloader | Run make php-audit of ncmake: a class loading finding or a package of vendor/ that the server ships itself fails with each place in the job summary, and a repository without appinfo/info.xml passes |
lint-containerfiles |
Lint Containerfiles | Run hadolint, with shellcheck on every RUN, over every tracked Containerfile and Dockerfile, with the repository's own .hadolint.yaml when it has one; a repository without Containerfiles passes |
lint-deps |
Lint deps | Run make deps-audit of ncmake on push, pull request and every day, then on the default branch and every stable* branch: a shipped dependency with a published vulnerability at the severity of the repository variable LINT_DEPS_SEVERITY or above, high without it, fails; the job summary names package, version, severity and advisory ids, never the advisory text, and a repository without appinfo/info.xml passes |
lint-info-xml-classes |
Lint info.xml classes | Run make php-audit of ncmake: a class appinfo/info.xml or registerSetupCheck() names that is missing or of the wrong kind, or an expensive repair step outside post-migration, fails with each place in the job summary, and a repository without appinfo/info.xml passes |
lint-licences |
Lint licences | Run make deps-audit NO_ADVISORIES=1 of ncmake: a shipped dependency under a licence that is incompatible with the app's, not free or missing fails, the findings go to the job summary, and a repository without appinfo/info.xml passes |
lint-markdown |
Lint Markdown | Run markdownlint-cli2 over every tracked Markdown file, with the repository's own configuration or the default rules minus those GitHub Markdown breaks on purpose; a repository without Markdown files passes |
lint-migrations |
Lint migrations | Run make php-audit of ncmake: a migration the server stops the install or the update on, in any Nextcloud major the app declares, fails with each place in the job summary, and a repository without appinfo/info.xml passes |
lint-ocp |
Lint OCP | Run make php-audit of ncmake: a class, method or constant of the public API the app uses that a Nextcloud major it declares does not have fails with each place in the job summary, and a repository without appinfo/info.xml passes |
lint-openapi |
Lint OpenAPI | Run make php-audit of ncmake: an OCS route missing from the committed openapi*.json, or an operation there that no route provides, fails with each operation in the job summary, without psalm or openapi-extractor, and a repository without appinfo/info.xml passes |
lint-php-syntax |
Lint php syntax | Run php -l over the tracked PHP files outside vendor/, node_modules/ and a path with {{, without composer or appinfo/info.xml; the version matrix comes from the PHP_VERSIONS variable, a .php-version file or the template default |
lint-routes |
Lint routes | Run make php-audit of ncmake: a route to a missing controller method, a route declared twice or a URL of the frontend that no route matches fails, a route nothing calls too with the repository variable LINT_ROUTES_UNREFERENCED true, each place goes to the job summary, and a repository without appinfo/info.xml passes |
lint-secrets |
Lint secrets | Run make secrets-audit SCOPE=history of ncmake over the commits of the push or the pull request: a key or a token in them fails, and the log and the job summary name the rule, the file and the commit, never the secret |
lint-shell |
Lint shell | Run make lint-shell of ncmake: shellcheck and the rule unset-local over every tracked shell script, found by extension or by shebang (covers extensionless commands); a repository without shell scripts passes |
lint-version |
Lint version | Run make lint-version of the ncmake lint module: the version in package.json, composer.json and package-lock.json against appinfo/info.xml, compared as written; a version that differs fails, the report goes to the job summary, and a repository without appinfo/info.xml passes |
lint-vue-imports |
Lint Vue imports | Fail when a tracked source file imports the @nextcloud/vue root instead of a per-component entry point, which pulls the whole library into the module graph before tree shaking; a repository without a hit passes |
lint-web |
Lint web | Run ESLint, Stylelint and html-validate over the tracked JavaScript, CSS and HTML of a repository without a Node project, without dependency trees, minified copies and bundler output, with the repository's own configuration or each tool's recommended set; a repository with a package.json, at the root or as js/package.json of a frontend in js/, or without such files passes |
lint-yaml |
Lint YAML | Run yamllint over every tracked YAML file, with the repository's own configuration or the default set adjusted for GitHub workflows; a repository without YAML files passes |
release |
ncmake release tarball | Build the release tarball with ncmake (make build && make dist) and attach it to the published GitHub release |
workflow-updater |
ncmake workflow update | Refresh the ncmake-managed CI workflows from their upstream templates on a schedule, on the default branch and on every stable* line, and open a pull request for each branch where anything changed (replaces Dependabot for .github/workflows/) |