Skip to content

Commit 6330b6e

Browse files
CI: run on push to main and set least-privilege GITHUB_TOKEN permissions
Add a push trigger on main so the full CI matrix (lint, unit, integration) re-runs on merge, matching dropbox-sdk-dotnet; previously ci.yml only ran on pull_request, so main could break undetected. Also add a top-level `permissions: contents: read` to both workflows to satisfy the CodeQL missing-workflow-permissions alert. Jobs that need OIDC keep their job-level id-token: write override.
1 parent 0ab9517 commit 6330b6e

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: CI
22
on:
3+
push:
4+
branches:
5+
- main
36
pull_request:
47

8+
permissions: # least privilege; jobs needing OIDC override this
9+
contents: read
10+
511
jobs:
612
CI:
713
runs-on: ${{ matrix.os }}

.github/workflows/coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
schedule:
88
- cron: 0 0 * * *
99

10+
permissions: # least privilege; jobs needing OIDC override this
11+
contents: read
12+
1013
jobs:
1114
Coverage:
1215
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)