diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6f1e2ab --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + groups: + security: + applies-to: security-updates + patterns: ["*"] + minor-and-patch: + applies-to: version-updates + patterns: ["*"] + update-types: ["minor", "patch"] + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + groups: + github-actions: + patterns: ["*"] + update-types: ["minor", "patch"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..36cf184 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: CI + +on: + pull_request: + push: + branches: [ main ] + +jobs: + rspec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + - run: bundle exec rspec diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..24b34ef --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,27 @@ +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + if: github.event.pull_request.user.login == 'dependabot[bot]' + runs-on: ubuntu-latest + steps: + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + # Patch/minor bumps and any PR that fixes a security advisory are + # queued for auto-merge; they still wait for the required CI checks. + - name: Enable auto-merge + if: steps.metadata.outputs.update-type != 'version-update:semver-major' || steps.metadata.outputs.ghsa-id != '' + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..25e8632 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.4.12 diff --git a/mise.toml b/mise.toml index 63adf13..c71cdd4 100644 --- a/mise.toml +++ b/mise.toml @@ -1,2 +1,2 @@ [tools] -ruby = "3.4.2" +ruby = "3.4.12"