Skip to content

ci: harden the lock update workflow and run CI on its PR - #64

Merged
nanomad merged 1 commit into
developfrom
ci/lock-update-fixes
Nov 12, 2026
Merged

nanomad merged 1 commit into
developfrom
ci/lock-update-fixes

Conversation

@nanomad

@nanomad nanomad commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #43, same change as SAIC-iSmart-API/saic-python-mqtt-gateway#521.

  • Read-only for untrusted code: poetry update, install, lint and tests run in a job with contents: read and persist-credentials: false. The checked poetry.lock is passed on as an artifact.
  • PR job: contents: write + pull-requests: write, runs no project code, and takes only a regular poetry.lock file from the artifact.
  • CI on the PR: pushes made with GITHUB_TOKEN don't trigger workflows, so a separate job with only actions: write runs gh workflow run ci.yml --ref chore/update-lock. Its checks show on the PR's head commit.
  • The pre-PR check now also runs ruff check.

Install, lint and tests run with contents: read and no stored credentials. Only the PR job can write contents and it takes only a regular poetry.lock from the artifact. A separate job with actions: write dispatches ci.yml on the PR branch, since pushes made with GITHUB_TOKEN don't trigger workflows. Also run ruff before opening the PR.
@nanomad
nanomad merged commit 11e711e into develop Nov 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant