Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
chore: Update dependencies without external action
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode committed Mar 25, 2022
1 parent f5d425f commit dfe807d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .github/auto-merge.yml

This file was deleted.

33 changes: 18 additions & 15 deletions .github/workflows/merge-dependencies.yml
@@ -1,23 +1,26 @@
name: 'Merge Dependencies'

# https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
# https://github.com/ahmadnassri/action-dependabot-auto-merge/issues/60#issuecomment-806027389
on: [pull_request_target]

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: 'Checkout repository'
uses: actions/checkout@v2.4.0
- name: 'Automerge dependency updates from Dependabot'
uses: ahmadnassri/action-dependabot-auto-merge@v2.6
# Guarantee that commit comes from Dependabot (don't blindly trust external GitHub Actions)
if: github.actor == 'dependabot[bot]'
with:
github-token: ${{ secrets.GH_TOKEN }}
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request#about-auto-merge
- name: 'Enable auto-merge on PR'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Approve PR'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit dfe807d

Please sign in to comment.