I would like to create a token that should be allowed to push tags to maxandersen/skills in my ci jobs
⏺
Skill
(gh-token)
⎿
Successfully loaded skill
·
3 tools allowed
⏺
Task:
Push tags to
maxandersen/skills
from CI jobs
Minimal permission:
Contents: Read and write
(tags are git refs; pushing them requires write access to contents)
---
Click to open:
Fill in these settings:
┌───────────────────┬──────────────────────────────────────────────┐
│ Field │ Value │
├───────────────────┼──────────────────────────────────────────────┤
│ Token name │
ci-push-tags-maxandersen-skills
(pre-filled) │
├───────────────────┼──────────────────────────────────────────────┤
│ Expiration │
90 days
│
├───────────────────┼──────────────────────────────────────────────┤
│ Resource owner │
maxandersen
│
├───────────────────┼──────────────────────────────────────────────┤
│ Repository access │ Only selected →
maxandersen/skills
│
├───────────────────┼──────────────────────────────────────────────┤
│
Permissions
│ │
├───────────────────┼──────────────────────────────────────────────┤
│ Contents │ Read and write │
└───────────────────┴──────────────────────────────────────────────┘
(All other permissions stay "No access")
---
Store it as a repo secret
After generating, copy the token immediately (shown only once) and run:
gh secret
set
GH_PUSH_TAGS_TOKEN --repo maxandersen/skills --body
"<token>"
▎
Never paste the token value into a chat or file.
If it's exposed, revoke it immediately.
---
Workflow
permissions:
block
Since this token is used as a secret (not
GITHUB_TOKEN
), the workflow permissions block is for
GITHUB_TOKEN
lockdown — keep it minimal:
permissions:
contents:
read
# GITHUB_TOKEN doesn't need write; use GH_PUSH_TAGS_TOKEN for tagging
In the step that pushes tags, use:
-
name:
Push
tag
env:
GH_TOKEN:
${{
secrets.GH_PUSH_TAGS_TOKEN
}}
run:
|
git tag v1.2.3
---