.github/workflows/main.yml in ragel-array-0.1.0 vs .github/workflows/main.yml in ragel-array-0.1.1
- old
+ new
@@ -1,27 +1,34 @@
name: Main
-on: push
+on:
+- push
+- pull_request_target
jobs:
ci:
name: CI
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@master
- uses: ruby/setup-ruby@v1
with:
- ruby-version: 2.7
- - uses: actions/cache@v1
- with:
- path: vendor/bundle
- key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
- restore-keys: |
- ${{ runner.os }}-gems-
- - name: Install dependencies
- run: |
- bundle config path vendor/bundle
- bundle install --jobs 4 --retry 3
+ ruby-version: 3.0
+ bundler-cache: true
- name: Lint and test
run: |
bundle exec rubocop --parallel
bundle exec rake test
+ automerge:
+ name: AutoMerge
+ needs: ci
+ runs-on: ubuntu-latest
+ if: github.event_name == 'pull_request_target' && (github.actor == github.repository_owner || github.actor == 'dependabot[bot]')
+ steps:
+ - uses: actions/github-script@v3
+ with:
+ script: |
+ github.pulls.merge({
+ owner: context.payload.repository.owner.login,
+ repo: context.payload.repository.name,
+ pull_number: context.payload.pull_request.number
+ })