This sets permissions: contents: read on the CI workflow, which is all the jobs use.
On this repository the token is already read-only, through the repository's default. The workflow's permissions key then adjusts that default (GitHub docs), so the setting now lives in the workflow.
The same change for libsecp256k1 is bitcoin-core/secp256k1#1964.
Closes #36512.