Menu

GitHub Actions secrets empty in fork pull requests explained
📰

GitHub Actions secrets empty in fork pull requests explained

DEV Community: cicd·Kay·about 7 hours ago
#6oXD6HhS
#devtocicd#devto#dev#context#secrets
Reading 0:00
15s threshold

GitHub Actions secrets empty in fork pull requests is a deliberate rule rather than a failure, and it produces no message at the moment it applies. Every reference simply becomes an empty string, and the first thing to complain is whichever tool was handed one.

GitHub documents the rule in one sentence: "With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository."

What this error means

A workflow is green on every push and red on every pull request opened from a fork, with no change to the file in between. The failing step is different from repository to repository, because the error belongs to the program that received the empty value rather than to Actions. Several steps often fail at once for the same reason, and the log never explains why the value was empty, because nothing observed it being emptied.

Common causes

The workflow runs on pull_request and the head repository is a fork

The rule in its plain form.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.