This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
generated from bennycode/ts-node-starter
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update dependencies without external action
- Loading branch information
Showing
2 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |