Skip to content

Commit ed8975a

Browse files
author
Ramraj Bishnoie
committed
added ability to bypass branch protection in actions
1 parent 93302a4 commit ed8975a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/generate-ide-rules.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- feature/update-actions-to-bypass-protection
89
paths:
910
- 'rules/**'
1011
- 'src/**'
@@ -16,12 +17,21 @@ jobs:
1617
runs-on: ubuntu-latest
1718
permissions:
1819
contents: write
20+
pull-requests: write
1921

2022
steps:
23+
- name: Generate GitHub App Token
24+
id: generate-token
25+
uses: actions/create-github-app-token@v1
26+
with:
27+
app-id: ${{ secrets.IDE_RULE_GEN_APP_ID }}
28+
private-key: ${{ secrets.IDE_RULE_GEN_APP_PRIVATE_KEY }}
29+
2130
- name: Checkout repository
2231
uses: actions/checkout@v4
2332
with:
2433
fetch-depth: 0
34+
token: ${{ steps.generate-token.outputs.token }}
2535

2636
- name: Install uv
2737
uses: astral-sh/setup-uv@v4
@@ -50,6 +60,8 @@ jobs:
5060
5161
- name: Commit and push generated rules
5262
if: steps.check_changes.outputs.changes == 'true'
63+
env:
64+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
5365
run: |
5466
git config --local user.email "github-actions[bot]@users.noreply.github.com"
5567
git config --local user.name "github-actions[bot]"

0 commit comments

Comments
 (0)