agentleFS
shalombshalomb/agent-skills/skills/github-actions-permissions/SKILL.md

github-actions-permissions

Skill3 starsChanged 3 months agoMITView on GitHub

Diagnose and fix GitHub Actions workflow failures caused by Actions permissions policies — startup_failure with no jobs, third-party actions blocked, allowed_actions misconfiguration. Use when workflows fail immediately with no logs, or when actions from outside the repo owner are rejected.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check what's allowed:

    line 38
  2. Very specific:

    If the repo is inside a GitHub org, the org may have its own Actions policy that overrides repo-level settings.

    line 105

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Actions Permissions

The symptom

Workflow shows startup_failure with zero jobs — no runner ever starts, no logs exist. The Actions UI shows an annotation like:

The actions actions/checkout@v4, astral-sh/setup-uv@v3 are not allowed in owner/repo because all actions must be from a repository owned by owner.

Why it happens

GitHub repos can restrict which Actions are permitted via Settings → Actions → General → Actions permissions. Common settings:

PolicyMeaning
allAny action allowed
local_onlyOnly actions from owner/* allowed
selectedExplicit allowlist (github-owned + patterns)

local_only is the default for many org-owned repos and silently blocks all third-party actions including actions/checkout (which is GitHub-owned but not owner-owned).

Diagnosis

gh api repos/OWNER/REPO/actions/permissions --jq '{enabled,allowed_actions}'
# {"allowed_actions":"local_only","enabled":true}  ← this is the problem

Check what's allowed:

gh api repos/OWNER/REPO/actions/permissions/selected-actions --jq '.'

Fix

Switch to selected and grant the patterns you need:

gh api repos/OWNER/REPO/actions/permissions \
  --method PUT \
  --input - <<'EOF'
{"enabled": true, "allowed_actions": "selected"}
EOF

gh api repos/OWNER/REPO/actions/permissions/selected-actions \
  --method PUT \
  --input - <<'EOF'
{
  "github_owned_allowed": true,
  "verified_allowed": true,
  "patterns_allowed": ["astral-sh/*", "googleapis/*", "pypa/*", "codecov/*"]
}
EOF

github_owned_allowed: true covers actions/checkout, actions/upload-artifact, actions/download-artifact, actions/setup-python, etc.

verified_allowed: true covers GitHub Marketplace verified creators.

patterns_allowed covers anything else — use owner/* globs.

Common patterns to allow by stack

Actions usedPattern needed
astral-sh/setup-uvastral-sh/*
googleapis/release-please-actiongoogleapis/*
pypa/gh-action-pypi-publishpypa/*
codecov/codecov-actioncodecov/*
docker/build-push-actiondocker/*
hashicorp/setup-terraformhashicorp/*
aws-actions/*aws-actions/*

Verify the fix

gh api repos/OWNER/REPO/actions/permissions/selected-actions --jq '.'
# {
#   "github_owned_allowed": true,
#   "verified_allowed": true,
#   "patterns_allowed": ["astral-sh/*", "googleapis/*", ...]
# }

Then re-trigger the failed workflow:

gh run rerun <run-id> --repo OWNER/REPO
# or push an empty commit to re-trigger push-based workflows
git commit --allow-empty -m "ci: re-trigger after fixing Actions permissions"
git push

Note on org-level policies

If the repo is inside a GitHub org, the org may have its own Actions policy that overrides repo-level settings. Repo-level selected cannot be more permissive than the org-level policy. If the fix above doesn't work, check:

gh api orgs/ORG/actions/permissions --jq '{allowed_actions}'

Org-level changes require org admin access.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.