Skip to content

Commit

Permalink
Merge pull request #83 from Shopify/add_dependabot
Browse files Browse the repository at this point in the history
Add Dependabot and Ruby 3.3.1
  • Loading branch information
gmac authored May 22, 2024
2 parents 04afa8e + 22464fd commit c399427
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
registries:
ruby-shopify:
type: rubygems-server
url: https://pkgs.shopify.io/basic/gems/ruby
username: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_USERNAME}}
password: ${{secrets.RUBYGEMS_SERVER_PKGS_SHOPIFY_IO_PASSWORD}}
github-com:
type: git
url: https://github.com
username: ${{secrets.DEPENDENCIES_GITHUB_USER}}
password: ${{secrets.DEPENDENCIES_GITHUB_TOKEN}}
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 100
insecure-external-code-execution: allow
registries: "*"
23 changes: 23 additions & 0 deletions .github/workflows/dependabot_auto_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dependabot auto-merge
on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 19 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,30 @@ on:
- cron: '0 8 * * 1'
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
gemfile: ['graphql_2.0', 'graphql_head']
runs-on: ${{ matrix.os }}
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake

test-v1:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: ['2.7', '3.0', '3.1', '3.2']
gemfile: ['graphql_1.13', 'graphql_2.0', 'graphql_head']
gemfile: ['graphql_1.13']
runs-on: ${{ matrix.os }}
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0
3.3.1

0 comments on commit c399427

Please sign in to comment.