🚸 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:
Lukas Burgholzer 2024-09-11 10:18:23 +02:00 committed by GitHub
parent 89ebbb66d2
commit 49df72dfcf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 14 deletions

View file

@ -23,7 +23,5 @@ jobs:
}
- name: Setup uv
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__\fixtures\uv-project

View file

@ -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: