mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-09-08 04:56:51 +00:00
🚸 use GitHub token by default (#61)
This PR adjusts the action so that it is no longer necessary to
explicitly specify the GitHub token to circumvent the API rate limit.
To this end, it simply passes the repository's GitHub token (available
via `${{ github.token }}`) as a default for the `github_token` action
input.
This is similar to how this is handled in, e.g.,
https://github.com/peter-evans/create-pull-request; specifically
[here](5354f85616/action.yml (L4-L6)
).
This commit is contained in:
2
.github/workflows/test-windows.yml
vendored
2
.github/workflows/test-windows.yml
vendored
@ -23,7 +23,5 @@ jobs:
|
||||
}
|
||||
- name: Setup uv
|
||||
uses: ./
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: uv sync
|
||||
working-directory: __tests__\fixtures\uv-project
|
||||
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -30,8 +30,6 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install default version
|
||||
uses: ./
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
test-specific-version:
|
||||
@ -46,7 +44,6 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
version: ${{ matrix.uv-version }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
test-checksum:
|
||||
@ -69,13 +66,14 @@ jobs:
|
||||
with:
|
||||
version: "0.3.2"
|
||||
checksum: ${{ matrix.checksum }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
test-without-github-token:
|
||||
test-with-explicit-token:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install default version
|
||||
uses: ./
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
test-uvx:
|
||||
|
Reference in New Issue
Block a user