Skip to content

Support alternative operating systems #290

Description

@schneems

Expected

When using setup-pack on a mac-os runner, I expect that it will either install the mac OS version of pack or fail.

Actual

Run buildpacks/github-actions/setup-pack@v5.7.1
Run #!/usr/bin/env bash
Installing pack 0.34.2
17s
Run bundle exec rundoc build --path ../tutorials/src/ruby/rundoc.md
== Running your docs
Running: Rundoc.configure do |config|  config.filter_sensitive(
    "tmp/rundoc_screenshots/screenshot_1.png" =>
      "assets/images/ruby-getting-started-screenshot.png"
  )
end
rundoc.require: Start executing "./intro.md"
rundoc.require: Done executing "./intro.md", putting contents into document
rundoc.require: Start executing "../shared/install_pack.md"
Running: $ '(brew install buildpacks/tap/pack) 2>&1'
Running: $ '(pack --version) 2>&1'
bundler: failed to load command: rundoc (/Users/runner/work/rundoc-on-github-actions/rundoc-on-github-actions/.rundoc-workspace/vendor/bundle/ruby/3.3.0/bin/rundoc)
/Users/runner/work/rundoc-on-github-actions/rundoc-on-github-actions/.rundoc-workspace/vendor/bundle/ruby/3.3.0/gems/rundoc-2.0.1/lib/rundoc/code_command/bash.rb:46:in `shell': Command `pack --version` exited with non zero status: sh: /Users/runner/bin/pack: cannot execute binary file (RuntimeError)
	from /Users/runner/work/rundoc-on-github-actions/rundoc-on-github-actions/.rundoc-workspace/vendor/bundle/ruby/3.3.0/gems/rundoc-2.0.1/lib/rundoc/code_command/bash.rb:25:in `call'
	from /Users/runner/work/rundoc-on-github-actions/rundoc-on-github-actions/.rundoc-workspace/vendor/bundle/ruby/3.3.0/gems/rundoc-2.0.1/lib/rundoc/code_section.rb:60:in `block in render'
	from /Users/runner/work/rundoc-on-github-actions/rundoc-on-github-actions/.rundoc-workspace/vendor/bundle/ruby/3.3.0/gems/rundoc-2.0.1/lib/rundoc/code_section.rb:53:in `each'
	from /Users/runner/work/rundoc-on-github-actions/rundoc-on-github-actions/.rundoc-workspace/vendor/bundle/ruby/3.3.0/gems/rundoc-2.0.1/lib/rundoc/code_section.rb:53:in `render'
	from /Users/runner/work/rundoc-on-github-actions/rundoc-on-github-actions/.rundoc-workspace/vendor/bundle/ruby/3.3.0/gems/rundoc-2.0.1/lib/rundoc/parser.rb:26:in `block in to_md'

The setup pack action exits successfully, but later when we try to run pack --version it fails because it's using the linux binary.

Suggested

  • Add a pack --version call after install in pack in the existing action to at least fail inside of the same action where the problem exists.

Alternatively:

  • Add support for it. It seems that brew is available, it could be effectively what I've got above, call out to brew install.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions