Skip to content

Commit 46a76b8

Browse files
authored
chore(ci): fix automation (#122)
1 parent 788e14d commit 46a76b8

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/dependabot-auto-merge.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ permissions:
1010

1111
jobs:
1212
auto-merge:
13-
name: Auto-merge
13+
name: Auto-merge dependabot pull requests
1414
runs-on: ubuntu-latest
1515
if: github.actor == 'dependabot[bot]'
16-
1716
steps:
17+
- name: Approve
18+
run: gh pr review "$PR_URL" --approve --comment --body "Auto-approve Dependabot pull requests"
19+
env:
20+
PR_URL: ${{ github.event.pull_request.html_url }}
21+
GH_TOKEN: ${{ secrets.LOCALSTACK_BOT_TOKEN }}
1822
- name: Enable auto-merge
19-
run: gh pr merge --auto --squash "$PR_URL"
23+
run: gh pr merge "$PR_URL" --auto --squash
2024
env:
2125
PR_URL: ${{ github.event.pull_request.html_url }}
22-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
GH_TOKEN: ${{ secrets.LOCALSTACK_BOT_TOKEN }}

.github/workflows/release-auto-merge.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ permissions:
1111

1212
jobs:
1313
auto-merge:
14-
name: Enable auto-merge on release PRs
14+
name: Auto-merge release pull requests
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: Enable auto-merge on release PRs
17+
- name: Find release pull request, approve and enable auto-merge
1818
env:
1919
GH_TOKEN: ${{ secrets.LOCALSTACK_BOT_TOKEN }}
2020
GH_REPO: ${{ github.repository }}
@@ -26,5 +26,6 @@ jobs:
2626
--jq '.[].number' | \
2727
while read -r pr; do
2828
echo "Enabling auto-merge on PR #$pr"
29+
gh pr review "$pr" --approve --comment --body "Auto-approve weekly releases"
2930
gh pr merge "$pr" --auto --squash
3031
done

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ jobs:
5151
- uses: googleapis/release-please-action@v4
5252
id: release
5353
with:
54-
token: ${{ secrets.LOCALSTACK_BOT_TOKEN }}
5554
release-type: node
5655

5756
build:

0 commit comments

Comments
 (0)