Skip to content

Commit 78330a2

Browse files
authored
Add Cloudflare Worker backend for secure GitHub App authentication (#21)
1 parent e9a2d6f commit 78330a2

20 files changed

Lines changed: 6389 additions & 9571 deletions

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@v6
3030
- name: configure
31-
run: cmake -S. -Bbuild
31+
run: cmake -Stest -Bbuild
3232
- name: build-${{ matrix.os.name }}
3333
run: |
3434
echo "CPPWARNINGNOTIFIER_LOG_MARKER"
@@ -38,13 +38,15 @@ jobs:
3838
needs:
3939
- compile
4040
runs-on: ubuntu-latest
41-
environment:
42-
name: CppWarningNotifier
41+
permissions:
42+
id-token: write
43+
pull-requests: write
44+
actions: read
4345
steps:
4446
- uses: actions/checkout@v6
4547
- uses: ./
4648
with:
47-
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
49+
WORKER_URL: https://cpp-warning-notifier.iris-cpp.org
4850
RUN_ID: ${{ github.run_id }}
4951
JOB_ID: ${{ job.check_run_id }}
5052
STEP_REGEX: build-.*

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
node_modules
2-
3-
build/*
1+
node_modules/
2+
build/

action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ inputs:
66
IGNORE_NO_MARKER:
77
default: false
88
RUN_ID:
9-
requird: true
9+
required: true
1010
JOB_ID:
1111
required: true
12-
PRIVATE_KEY:
12+
# Cloudflare Worker URL to exchange a GitHub OIDC token for an installation
13+
# access token (requires id-token: write permission on the job)
14+
WORKER_URL:
1315
required: true
1416
JOB_REGEX:
1517
required: true
@@ -21,5 +23,5 @@ inputs:
2123
required: true
2224

2325
runs:
24-
using: "node20"
25-
main: "dist/index.js"
26+
using: "node24"
27+
main: "action/dist/index.js"

0 commit comments

Comments
 (0)