Skip to content

Bump actions/checkout from 3 to 4 #253

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #253

Workflow file for this run

name: ci
on:
pull_request:
types: [labeled, synchronize]
push:
branches: [master]
permissions:
contents: write
pull-requests: write
jobs:
qa:
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Freeze autogenerated files
run: |
chmod 0444 Gemfile.lock
- name: Setup Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: |
bin/rspec
dependabot:
if: github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
merge:
if: ${{ contains(github.event.pull_request.labels.*.name, 'automerge') }}
runs-on: ubuntu-latest
needs: qa
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Merge pull request
run: |
PR_NUMBER=$(basename "$PR_URL")
PR_TITLE=$(gh pr view "$PR_NUMBER" --json title -q ".title")
PR_BODY=$(gh pr view "$PR_NUMBER" --json body -q ".body")
COMMIT_MESSAGE="${PR_TITLE} (#${PR_NUMBER})"
gh pr merge "$PR_URL" --auto --squash --subject "$COMMIT_MESSAGE" --body "$PR_BODY"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}