Skip to content

Commit

Permalink
Output getting started guide to GH actions on push
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Jul 11, 2023
1 parent 70fe15e commit a8e6ec4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,30 @@ jobs:
- name: Run integration tests
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests).
run: cargo test --locked -- --ignored

pack-getting-started-output:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install musl-tools
run: sudo apt-get install musl-tools --no-install-recommends
- name: Update Rust toolchain
run: rustup update
- name: Install Rust linux-musl target
run: rustup target add x86_64-unknown-linux-musl
- name: Rust Cache
uses: Swatinem/rust-cache@v2.5.1
- name: Install Pack CLI
uses: buildpacks/github-actions/setup-pack@v5.2.0
- name: Pull builder image
run: docker pull "heroku/builder:22"
- name: Clone ruby getting started guide
run: mkdir tmp; git clone https://github.com/heroku/ruby-getting-started tmp/ruby-getting-started
- name: Install libcnb-cargo for `cargo libcnb package` command
run: cargo install libcnb-cargo
- name: Compile ruby buildpack
run: cargo libcnb package
- name: Getting started guide output
run: | # Use `script -e -c` to pretend to be a TTY for pack terminal color suport
script -e -c "pack build my-image --builder heroku/builder:22 --buildpack heroku/nodejs-engine --buildpack target/buildpack/debug/heroku_ruby --path tmp/ruby-getting-started"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Make sure it doesn't say `/usr/bin/ruby` or another system ruby location
As a oneliner:

```
$(set -pipefail; cd buildpacks/ruby && cargo libcnb package; cd ../..) &&
cargo libcnb package &&
docker rmi my-image --force &&
pack build my-image --buildpack target/buildpack/debug/heroku_ruby --path buildpacks/ruby/tests/fixtures/default_ruby --verbose &&
docker run -it --rm --entrypoint='/cnb/lifecycle/launcher' my-image 'which bundle'
Expand Down

0 comments on commit a8e6ec4

Please sign in to comment.