Skip to content

Commit 9785223

Browse files
authored
Merge pull request #17 from useblacksmith/fix-token-fallback
Fix: Remove broken token fallback in checkout action
2 parents 7fb7278 + d5e70b9 commit 9785223

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.github/workflows/rebase-upstream.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
token: ${{ secrets.WORKFLOW_TOKEN || secrets.GITHUB_TOKEN }}
21+
token: ${{ secrets.WORKFLOW_TOKEN }}
2222

2323
- name: Setup git
2424
run: |

.github/workflows/release-patched-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/checkout@v4
2929
with:
3030
fetch-depth: 0
31-
token: ${{ secrets.WORKFLOW_TOKEN || secrets.GITHUB_TOKEN }}
31+
token: ${{ secrets.WORKFLOW_TOKEN }}
3232

3333
- name: Setup git
3434
run: |

DEPLOYMENT.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ This fork maintains patches on top of upstream BuildKit using a rebase workflow.
66

77
## Setup Requirements
88

9-
If your patches modify workflow files (`.github/workflows/*.yml`), you need to create a Personal Access Token:
10-
11-
1. Go to GitHub Settings > Developer settings > Personal access tokens
12-
2. Create a new token with `repo` and `workflow` scopes
13-
3. Add it as a secret named `WORKFLOW_TOKEN` in your repository settings
14-
15-
Without this token, the workflows will fall back to using `GITHUB_TOKEN`, which cannot push workflow changes.
9+
**Required**: You must create a Personal Access Token for the workflows to function properly:
10+
11+
1. Go to GitHub Settings > Developer settings > Personal access tokens > Tokens (classic)
12+
2. Click "Generate new token (classic)"
13+
3. Give it a descriptive name (e.g., "BuildKit Fork Workflow")
14+
4. Select these scopes:
15+
- `repo` (all checkboxes under repo)
16+
- `workflow` (update GitHub Action workflows)
17+
5. Generate the token and copy it
18+
6. Go to your fork's Settings > Secrets and variables > Actions
19+
7. Click "New repository secret"
20+
8. Name: `WORKFLOW_TOKEN`
21+
9. Value: Paste your Personal Access Token
22+
23+
This token is necessary because:
24+
- The default `GITHUB_TOKEN` cannot push changes to workflow files
25+
- Some patches may include modifications to `.github/workflows/*.yml` files
1626

1727
## Creating a Patched Release
1828

0 commit comments

Comments
 (0)