Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action-docs 2.5.0 (new formula) #195773

Merged
merged 2 commits into from
Oct 29, 2024
Merged
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
43 changes: 43 additions & 0 deletions Formula/a/action-docs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
class ActionDocs < Formula
desc "Generate docs for GitHub actions"
homepage "https://github.com/npalm/action-docs"
url "https://registry.npmjs.org/action-docs/-/action-docs-2.5.0.tgz"
sha256 "109170e521e4096b571932a6c0af640db48d1d82c3023488c70f0c909787792e"
license "MIT"

bottle do
sha256 cellar: :any_skip_relocation, all: "abd1926961e5319b5400d918b66417b6e187855983f47f2182d2de1fe7d699af"
end

depends_on "node"

def install
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
test_file = testpath/"action.yml"
test_file.write <<~YAML
---
name: "Example name"
description: "Example action description"
author: "Example action author"
inputs:
example:
description: "Example input description"
required: false
runs:
using: "composite"
steps:
- id: random-number-generator
run: echo "random-id=$(echo $RANDOM)" >> $GITHUB_OUTPUT
shell: bash
YAML

output = shell_output("#{bin}/action-docs --source #{test_file}")
assert_match "Example input description", output

assert_match version.to_s, shell_output("#{bin}/action-docs --version")
end
end
Loading