Skip to content

Commit cbc0104

Browse files
committed
auto merge script
1 parent 3f34bde commit cbc0104

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"

.github/workflows/auto-merge.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Dependabot Auto Merge
2+
3+
on:
4+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
5+
# could and should work, at least for public repos;
6+
# tracking issue for this action's issue:
7+
# https://github.com/ahmadnassri/action-dependabot-auto-merge/issues/60
8+
pull_request_target:
9+
types: [labeled]
10+
11+
jobs:
12+
auto:
13+
if: github.actor == 'dependabot[bot]'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Auto approve pull request, then squash and merge
20+
uses: ahmadnassri/action-dependabot-auto-merge@v2
21+
with:
22+
target: minor
23+
# Note: This needs to be a PAT with (public) repo rights,
24+
# PAT-owning user needs to have write access to this repo
25+
# (dependabot needs to recognize the comment as coming from an allowed reviewer)
26+
github-token: ${{ secrets.PAT_REPO_ADMIN }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
runs-on: ${{ matrix.host_os }}
4242
steps:
43-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@v4
4444

4545
- name: Prepare
4646
shell: bash
@@ -68,7 +68,7 @@ jobs:
6868
fi
6969
7070
- name: Upload
71-
uses: softprops/action-gh-release@v1
71+
uses: softprops/action-gh-release@v2
7272
env:
7373
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7474
with:

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222

2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
- name: rustfmt
2626
run: cargo fmt --all -- --check
2727
- name: check

0 commit comments

Comments
 (0)