Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,44 @@ jobs:
cache-dependency-path: actions/publish-single-page-docs/package-lock.json
- run: npm ci
working-directory: actions/publish-single-page-docs
# Action manifests are only parsed by *consuming* repositories' runners, so
# a syntax error here ships green and breaks every downstream workflow at
# "Set up job" (#39). Parse them with the same pinned `yaml` package the
# action already depends on, so this needs no extra tooling.
- name: Validate action manifests
working-directory: actions/publish-single-page-docs
run: |
node -e '
const fs = require("node:fs");
const path = require("node:path");
const YAML = require("yaml");
const root = path.resolve("../..");
const files = [];
(function walk(dir) {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
if (entry.name === "node_modules") continue;
const full = path.join(dir, entry.name);
if (entry.isDirectory()) walk(full);
else if (/\.ya?ml$/.test(entry.name)) files.push(full);
}
})(path.join(root, "actions"));
if (files.length === 0) {
console.error("no action manifests found under actions/ — check this glob");
process.exit(1);
}
let failed = 0;
for (const file of files) {
const name = path.relative(root, file);
try {
YAML.parse(fs.readFileSync(file, "utf8"));
console.log("ok " + name);
} catch (error) {
failed += 1;
console.error("FAILED " + name + ": " + error.message);
}
}
process.exit(failed === 0 ? 0 : 1);
'
- run: npm run selftest
working-directory: actions/publish-single-page-docs

Expand Down
3 changes: 2 additions & 1 deletion actions/publish-single-page-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ inputs:
required: false
default: ${{ github.event.release.tag_name }}
github-token:
description: Token used to upload the release asset. Needs `contents: write`.
description: >-
Token used to upload the release asset. Needs `contents: write`.
required: false
default: ${{ github.token }}

Expand Down