diff --git a/.github/workflows/danger-run.yml b/.github/workflows/danger-run.yml index 841f9e8..b657245 100644 --- a/.github/workflows/danger-run.yml +++ b/.github/workflows/danger-run.yml @@ -8,6 +8,11 @@ on: required: false type: string default: "" + gemfile: + description: "Gemfile path for Bundler. Leave empty to use the repository's default Gemfile." + required: false + type: string + default: Gemfile bundler-cache: description: "Use bundler-cache in ruby/setup-ruby." required: false @@ -35,6 +40,8 @@ permissions: jobs: danger: runs-on: ubuntu-latest + env: + BUNDLE_GEMFILE: ${{ inputs.gemfile }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5197140..8b8b86c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- [#13](https://github.com/numbata/danger-pr-comment/pull/13): Add a `gemfile` input to the Danger Run workflow for selecting a non-default Gemfile - [@dblock](https://github.com/dblock). - [#10](https://github.com/numbata/danger-pr-comment/pull/10): Automate release changelog preparation and update workflow tag references in the README, installer, and installer specs - [@dblock](https://github.com/dblock). - [#12](https://github.com/numbata/danger-pr-comment/pull/12): Add a version input and restricted access to the release workflow, and reject versions that already exist - [@numbata](https://github.com/numbata). diff --git a/Gemfile b/Gemfile index 813a236..bbed508 100644 --- a/Gemfile +++ b/Gemfile @@ -16,5 +16,7 @@ end group :test do gem 'danger-changelog', '~> 0.8', require: false gem 'danger-toc', '~> 0.2', require: false + # Temporary until Danger's git 6 support lands: https://github.com/danger/danger/pull/1561 + gem 'git', '< 6', require: false gem 'rspec' end diff --git a/README.md b/README.md index 7015e20..108d7e0 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ The `Danger Comment` workflow requires explicit permissions. Reusable workflows #### `danger-run.yml` - `ruby-version`: Ruby version for `ruby/setup-ruby`. Leave empty to use `.ruby-version`/`.tool-versions`. +- `gemfile`: Gemfile path for Bundler (default `Gemfile`), for example `gemfiles/danger.gemfile`. - `bundler-cache`: Enable Bundler caching (default `true`). - `danger-args`: Arguments passed to `bundle exec danger` (default `dry_run`). - `report-artifact-name`: Artifact name for the report (default `danger-report`). diff --git a/lib/danger-pr-comment/version.rb b/lib/danger-pr-comment/version.rb index 7902ea4..01188d3 100644 --- a/lib/danger-pr-comment/version.rb +++ b/lib/danger-pr-comment/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module DangerPrComment - VERSION = '0.1.2' + VERSION = '0.2.0' end