ci: Use GitHub App token in scheduled_audit.yaml
What problem does this PR solve?
Problem Summary:
The scheduled_audit.yaml workflow uses the default GITHUB_TOKEN instead of a GitHub App token, which provides insufficient permissions and doesn't follow the repository's established authentication pattern.
What is changed and how it works?
What's Changed:
- Add GitHub App token generation step using
actions/create-github-app-token@v2 - Configure with
RELEASE_PLZ_APP_IDandRELEASE_PLZ_APP_PRIVATE_KEYsecrets - Pass generated token to
cargo-audit-check-actioninstead of defaultGITHUB_TOKEN - Update
actions/checkoutfrom v1 to v6 - Add
workflow_dispatchtrigger to allow manual execution of the workflow - Remove unnecessary
permissionsblock since permissions are handled by the GitHub App token
The workflow now matches the authentication pattern in release-plz.yml:
- name: Generate GitHub token
uses: actions/create-github-app-token@v2
id: generate-token
with:
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
- uses: yangby-cryptape/cargo-audit-check-action@customized-for-ckb
with:
token: ${{ steps.generate-token.outputs.token }}
Related changes
- Need to ensure
RELEASE_PLZ_APP_IDandRELEASE_PLZ_APP_PRIVATE_KEYsecrets are configured in repository settings
Check List
Tests
- No code ci-runs-only: [ quick_checks,linters ]
Release note
None: Exclude this PR from the release note.
Original prompt
Fix scheduled_audit.yaml by fetching GITHUB_TOKEN via GitHub App. Reference to the workflow release-plz.yml
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
@copilot Add manual trigger for the job.
@copilot Add manual trigger for the job.
Added workflow_dispatch trigger in commit af56af1. The workflow can now be triggered manually from the Actions tab in addition to the scheduled daily run.
@copilot rebase
@copilot rebase
@copilot rebase
I'm unable to perform git rebase operations as force push is not available in my environment. The rebase would need to be done manually or by someone with direct repository access. The current changes in this PR are clean and ready for merge without conflicts.
@copilot rebase
I cannot perform rebase operations due to environment restrictions (no force-push capability). If you need to rebase this branch onto an updated base branch, it will need to be done manually with direct repository access. Alternatively, if you'd like me to recreate these changes in a new branch, please let me know and I can create a fresh PR with the same changes.
@copilot force rebase