Skip to content

Commit 59ff939

Browse files
authored
Merge pull request #33 from project-codeguard/develop
Update actions to bypass branch protections
2 parents 93302a4 + 79153ed commit 59ff939

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21+
- name: Generate GitHub App Token
22+
id: generate-token
23+
uses: actions/create-github-app-token@v1
24+
with:
25+
app-id: ${{ secrets.CODEGUARD_APP_ID }}
26+
private-key: ${{ secrets.CODEGUARD_APP_PRIVATE_KEY }}
27+
2128
- name: Checkout repository
2229
uses: actions/checkout@v4
2330
with:
2431
fetch-depth: 0
32+
token: ${{ steps.generate-token.outputs.token }}
2533

2634
- name: Install uv
2735
uses: astral-sh/setup-uv@v4
@@ -42,5 +50,7 @@ jobs:
4250
git config --local user.name "github-actions[bot]"
4351
4452
- name: Deploy to GitHub Pages
53+
env:
54+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
4555
run: uv run mkdocs gh-deploy --force --clean --verbose
4656

.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+
- develop
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.CODEGUARD_APP_ID }}
28+
private-key: ${{ secrets.CODEGUARD_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)