mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-16 23:56:37 +00:00
Optimize binstalk-git-repo-api
Use a dedicated github token in CI Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
5bcc243741
commit
2e80eeef97
2 changed files with 120 additions and 118 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -61,6 +61,7 @@ jobs:
|
||||||
- run: just test
|
- run: just test
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.CI_TEST_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.CI_TEST_GITHUB_TOKEN }}
|
||||||
|
CI_UNIT_TEST_GITHUB_TOKEN: ${{ secrets.CI_UNIT_TEST_GITHUB_TOKEN }}
|
||||||
|
|
||||||
cross-check:
|
cross-check:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -135,7 +136,7 @@ jobs:
|
||||||
uses: cargo-bins/release-meta@v1
|
uses: cargo-bins/release-meta@v1
|
||||||
with:
|
with:
|
||||||
event-data: ${{ toJSON(github.event) }}
|
event-data: ${{ toJSON(github.event) }}
|
||||||
extract-notes-under: '### Release notes'
|
extract-notes-under: "### Release notes"
|
||||||
|
|
||||||
release-dry-run:
|
release-dry-run:
|
||||||
needs: pr-info
|
needs: pr-info
|
||||||
|
@ -283,7 +284,6 @@ jobs:
|
||||||
# and build quite a few unused dependencies.
|
# and build quite a few unused dependencies.
|
||||||
working-directory: crates/detect-targets
|
working-directory: crates/detect-targets
|
||||||
|
|
||||||
|
|
||||||
# Dummy job to have a stable name for the "all tests pass" requirement
|
# Dummy job to have a stable name for the "all tests pass" requirement
|
||||||
tests-pass:
|
tests-pass:
|
||||||
name: Tests pass
|
name: Tests pass
|
||||||
|
|
|
@ -508,7 +508,9 @@ mod test {
|
||||||
|
|
||||||
let mut gh_clients = vec![GhApiClient::new(client.clone(), None)];
|
let mut gh_clients = vec![GhApiClient::new(client.clone(), None)];
|
||||||
|
|
||||||
if let Ok(token) = env::var("GITHUB_TOKEN") {
|
if let Ok(token) =
|
||||||
|
env::var("CI_UNIT_TEST_GITHUB_TOKEN").or_else(|_| env::var("GITHUB_TOKEN"))
|
||||||
|
{
|
||||||
gh_clients.push(GhApiClient::new(client, Some(token.into())));
|
gh_clients.push(GhApiClient::new(client, Some(token.into())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue