CI: run on push to main and set least-privilege workflow permissions#546
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #546 +/- ##
=======================================
Coverage 65.19% 65.19%
=======================================
Files 34 34
Lines 65205 65205
Branches 4642 4642
=======================================
Hits 42508 42508
Misses 22536 22536
Partials 161 161
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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 ci.yml, coverage.yml, and spec_update.yml to satisfy the CodeQL missing-workflow-permissions alert. Jobs that need OIDC keep their job-level id-token: write override; spec_update creates PRs via the SPEC_UPDATE_TOKEN PAT, not GITHUB_TOKEN.
AndreyVMarkelov
force-pushed
the
ci/run-ci-on-push-to-main
branch
from
July 15, 2026 23:11
6330b6e to
4b10d97
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related CI hardening fixes:
Run CI on merge to
main.ci.ymlwas triggered onpull_requestonly, so the full matrix (lint + unit + integration) never re-ran on the merge commit —maincould break undetected (e.g. a PR green against a stale base, or two PRs that conflict only once both land). Add apush: [main]trigger, matchingdropbox-sdk-dotnet'sci.yml.Set least-privilege
GITHUB_TOKENpermissions. Resolves the CodeQLactions/missing-workflow-permissionsalert (Feature request: batch upload/download files #5). Add a top-levelpermissions: contents: readto bothci.ymlandcoverage.yml. Jobs that use OIDC keep their existing job-levelid-token: writeoverride, so credential fetching is unaffected.