Bump Bundler Version #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Bump Bundler Version | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '.ruby-version' | |
| jobs: | |
| bump-bundler: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: hmarr/debug-action@v3 | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/workflows/composite/setup | |
| - name: Update BUNDLED WITH in Gemfile.lock | |
| run: | | |
| echo "Remove all bundler versions except the default one" | |
| gem uninstall bundler -a -x | |
| ruby -v | |
| bundler -v | |
| # We are modifying the Gemfile.lock, thus have to set frozen to false. | |
| bundle config set frozen false | |
| BUNDLER_VERSION=$(ruby -rbundler -e 'puts Bundler::VERSION') | |
| echo "Update bundler version in Gemfile.lock" | |
| bundle update --bundler=$BUNDLER_VERSION | |
| pushd docs/v3 | |
| echo "Update bundler version in docs/v3/Gemfile.lock" | |
| bundle update --bundler=$BUNDLER_VERSION | |
| popd | |
| # Don't commit changes in vendor/bundle folder. | |
| echo "vendor/bundle/" >> .git/info/exclude | |
| if git diff --quiet; then | |
| echo "changes=false" >> $GITHUB_ENV | |
| else | |
| echo "changes=true" >> $GITHUB_ENV | |
| fi | |
| - name: Create or Update Pull Request | |
| if: env.changes == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| branch: bump-bundler-version-${{ github.ref_name }} | |
| title: "Automated Bump of Bundler Version in Gemfile.lock" | |
| body: | | |
| This PR updates Gemfile.lock and docs/v3/Gemfile.lock to use the default Bundler version. | |
| labels: "needs_review" | |
| commit-message: "Bump Bundler Version in Gemfile.lock and docs/v3/Gemfile.lock" | |
| committer: "ari-wg-gitbot <[email protected]>" | |
| author: "ari-wg-gitbot <[email protected]>" |