From f79754f63d78db19a6c90d832139b33724f594bb Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Tue, 23 Aug 2022 17:05:46 -0400 Subject: [PATCH] Support Ruby 2.7.0 --- .github/workflows/auto-merge.yml | 22 ++++++++++++++++++++++ .github/workflows/main.yml | 19 +------------------ 2 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/auto-merge.yml diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 00000000..9b28abf4 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,22 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1.3.3 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d707f33c..d35471fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ name: Main on: - push -- pull_request_target +- pull_request jobs: ci: strategy: @@ -40,20 +40,3 @@ jobs: run: | bundle exec rake stree:check bundle exec rubocop - - automerge: - name: AutoMerge - needs: - - ci - - check - runs-on: ubuntu-latest - if: github.event_name == 'pull_request_target' && 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 - })