fix: v1 setup on Linux musl (#432)

## Summary

- Detect Linux musl runners in the v1 action and download the Supabase
CLI `.apk` asset for CLI versions `>= 2.99.0`.
- Add the extracted `usr/bin` directory to `PATH` for `.apk` archives.
- Backport the optional `github-token` input for authenticated `latest`
release lookup, because the test matrix hit unauthenticated GitHub API
rate limits.
- Rebuild `dist/index.js` for the Node action.

## Validation

- `npm run format:check`
- `npm run lint`
- `npm test`
- `npm run package`
- Local Docker smoke test in `node:20-alpine` with
`INPUT_VERSION=2.100.1`
- setup-cli-testing workflow:
https://github.com/jgoux/setup-cli-testing/actions/runs/26165593808

The external workflow passed Alpine `2.100.1`, Alpine `latest`, and
Ubuntu/macOS/Windows with both `2.100.1` and `latest`.
This commit is contained in:
Julien Goux
2026-05-20 16:22:46 +02:00
committed by GitHub
parent cd9b0fd6c9
commit ad077b4817
22 changed files with 43754 additions and 15606 deletions

View File

@@ -44,6 +44,7 @@ steps:
- uses: supabase/setup-cli@v1
with:
version: latest
github-token: ${{ github.token }}
- run: supabase init
- run: supabase db start
```
@@ -55,9 +56,10 @@ on Windows and macOS runners.
The actions supports the following inputs:
| Name | Type | Description | Default | Required |
| --------- | ------ | ---------------------------------- | -------- | -------- |
| `version` | String | Supabase CLI version (or `latest`) | `2.20.3` | false |
| Name | Type | Description | Default | Required |
| -------------- | ------ | -------------------------------------------------------------------------- | -------- | -------- |
| `version` | String | Supabase CLI version (or `latest`) | `2.20.3` | false |
| `github-token` | String | GitHub token used to resolve `latest` without unauthenticated API limiting | | false |
## Advanced Usage
@@ -135,8 +137,8 @@ need to perform some initial setup steps before you can develop your action.
## Publish to a distribution branch
Actions are run from this GitHub repository so we will checkin the packed `dist`
folder.
Actions are run from this GitHub repository so we will check in the packed
`dist` folder.
1. Create a new GitHub release
2. Rebase `v1` branch on `main`
@@ -155,6 +157,7 @@ repository (see [test.yml](.github/workflows/test.yml))
uses: ./
with:
version: latest
github-token: ${{ github.token }}
```
See the [actions tab](https://github.com/supabase/setup-cli/actions) for runs of