diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18d7b53..2dcf44a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,10 @@ name: Build + on: workflow_call: jobs: - build: + build-and-test: runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 8a733fd..10941e7 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -1,8 +1,24 @@ -name: Pull request +name: Pull requests + on: pull_request jobs: - build: - uses: ./.github/workflows/build.yml - secrets: inherit - + build: + uses: ./.github/workflows/build.yml + secrets: inherit + auto-merge: + if: ${{ github.actor == 'dependabot[bot]' }} + needs: build + runs-on: ubuntu-latest + steps: + - name: Fetch dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1.1.1 + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + - name: Merge non-major dependency updates + if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}