Skip to content

Commit 7b90568

Browse files
authored
Merge pull request Homebrew#195773 from nitrocode/action-docs
action-docs 2.5.0 (new formula)
2 parents 7b2220e + 08d0f58 commit 7b90568

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Formula/a/action-docs.rb

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
class ActionDocs < Formula
2+
desc "Generate docs for GitHub actions"
3+
homepage "https://github.com/npalm/action-docs"
4+
url "https://registry.npmjs.org/action-docs/-/action-docs-2.5.0.tgz"
5+
sha256 "109170e521e4096b571932a6c0af640db48d1d82c3023488c70f0c909787792e"
6+
license "MIT"
7+
8+
bottle do
9+
sha256 cellar: :any_skip_relocation, all: "abd1926961e5319b5400d918b66417b6e187855983f47f2182d2de1fe7d699af"
10+
end
11+
12+
depends_on "node"
13+
14+
def install
15+
system "npm", "install", *std_npm_args
16+
bin.install_symlink Dir["#{libexec}/bin/*"]
17+
end
18+
19+
test do
20+
test_file = testpath/"action.yml"
21+
test_file.write <<~YAML
22+
---
23+
name: "Example name"
24+
description: "Example action description"
25+
author: "Example action author"
26+
inputs:
27+
example:
28+
description: "Example input description"
29+
required: false
30+
runs:
31+
using: "composite"
32+
steps:
33+
- id: random-number-generator
34+
run: echo "random-id=$(echo $RANDOM)" >> $GITHUB_OUTPUT
35+
shell: bash
36+
YAML
37+
38+
output = shell_output("#{bin}/action-docs --source #{test_file}")
39+
assert_match "Example input description", output
40+
41+
assert_match version.to_s, shell_output("#{bin}/action-docs --version")
42+
end
43+
end

0 commit comments

Comments
 (0)