Repository navigation
Check Bundler Version #17
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: Check Bundler Version | |
| on: | |
| schedule: | |
| - cron: "0 10 * * 0" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| check-bundler: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Update Bundler if needed | |
| id: update-bundler | |
| run: | | |
| gem update bundler | |
| bundle config set --local frozen false | |
| bundle update --bundler | |
| if git diff --quiet Gemfile.lock; then | |
| echo "No changes to commit" | |
| echo "updated=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "updated=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.update-bundler.outputs.updated == 'true' | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "Update Bundler version" | |
| title: "Update Bundler version" | |
| body: "This PR updates the Bundler version in Gemfile.lock." | |
| branch: update-bundler-version | |
| delete-branch: true | |
| labels: dependencies | |
| add-paths: Gemfile.lock |