Skip to content

Commit 61cd1a7

Browse files
authored
need to use the token with the workflow permissions (#91)
Signed-off-by: Derek Misler <derek.misler@docker.com>
1 parent e84040b commit 61cd1a7

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

.github/workflows/pr-describe.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,19 @@ jobs:
275275
- name: Post summary
276276
if: always()
277277
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
278+
env:
279+
PR_TITLE: ${{ steps.pr_details.outputs.title }}
280+
PR_BRANCH: ${{ steps.pr_details.outputs.branch }}
281+
PR_BASE: ${{ steps.pr_details.outputs.base }}
282+
PR_CONCLUSION: ${{ steps.generate.conclusion }}
278283
with:
279284
github-token: ${{ steps.app-token.outputs.token || github.token }}
280285
script: |
281-
// Use context.issue.number directly - always available, doesn't depend on previous steps
282286
const prNumber = context.issue.number;
283-
const title = '${{ steps.pr_details.outputs.title }}' || 'Unknown';
284-
const branch = '${{ steps.pr_details.outputs.branch }}' || 'Unknown';
285-
const base = '${{ steps.pr_details.outputs.base }}' || 'Unknown';
286-
const conclusion = '${{ steps.generate.conclusion }}' || 'failure';
287+
const title = process.env.PR_TITLE || 'Unknown';
288+
const branch = process.env.PR_BRANCH || 'Unknown';
289+
const base = process.env.PR_BASE || 'Unknown';
290+
const conclusion = process.env.PR_CONCLUSION || 'failure';
287291
288292
const summary = [
289293
'## 📝 PR Description Generator',

.github/workflows/release.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,11 @@ jobs:
174174
group: update-pinata
175175
cancel-in-progress: false
176176
steps:
177-
- name: Generate GitHub App token
178-
id: app-token
179-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
180-
with:
181-
app_id: ${{ secrets.CAGENT_REVIEWER_APP_ID }}
182-
private_key: ${{ secrets.CAGENT_REVIEWER_APP_PRIVATE_KEY }}
183-
repository: docker/pinata
184-
185177
- name: Checkout pinata
186178
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
187179
with:
188180
repository: docker/pinata
189-
token: ${{ steps.app-token.outputs.token }}
181+
token: ${{ secrets.RELEASE_TOKEN }}
190182

191183
- name: Update cagent-action reference
192184
id: update
@@ -224,15 +216,15 @@ jobs:
224216
- name: Create or update PR
225217
if: steps.update.outputs.skip != 'true'
226218
env:
227-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
219+
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
228220
VERSION: ${{ needs.release.outputs.version }}
229221
SHA: ${{ needs.release.outputs.sha }}
230222
run: |
231223
BRANCH="auto/update-cagent-action"
232224
RELEASE_URL="https://github.com/docker/cagent-action/releases/tag/$VERSION"
233225
234-
git config user.name "docker-agent[bot]"
235-
git config user.email "259137750+docker-agent[bot]@users.noreply.github.com"
226+
git config user.name "github-actions[bot]"
227+
git config user.email "github-actions[bot]@users.noreply.github.com"
236228
237229
git checkout -B "$BRANCH"
238230
git add .github/workflows/pr-review.yml

0 commit comments

Comments
 (0)