chore(deps): bump @rollup/rollup-linux-x64-gnu Bumps the npm-production group with 1 update: [@rollup/rollup-linux-x64-gnu](https://github.com/rollup/rollup). Updates `@rollup/rollup-linux-x64-gnu` from 4.50.1 to 4.50.2 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.50.1...v4.50.2) --- updated-dependencies: - dependency-name: "@rollup/rollup-linux-x64-gnu" dependency-version: 4.50.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
⚙️ Supabase CLI Action
About
This action sets up the Supabase CLI,
supabase, on GitHub's hosted Actions
runners. Other CI runners like
Bitbucket
and
GitLab
are supported via their respective pipelines.
This action can be run on ubuntu-latest, windows-latest, and macos-latest
GitHub Actions runners, and will install and expose a specified version of the
supabase CLI on the runner environment.
Usage
Setup the supabase CLI:
steps:
- uses: supabase/setup-cli@v1
A specific version of the supabase CLI can be installed:
steps:
- uses: supabase/setup-cli@v1
with:
version: 2.20.3
Run supabase db start to execute all migrations on a fresh database:
steps:
- uses: supabase/setup-cli@v1
with:
version: latest
- run: supabase init
- run: supabase db start
Since Supabase CLI relies on Docker Engine API, additional setup may be required on Windows and macOS runners.
Inputs
The actions supports the following inputs:
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
version |
String | Supabase CLI version (or latest) |
2.20.3 |
false |
Advanced Usage
Check generated TypeScript types are up-to-date with Postgres schema:
steps:
- uses: supabase/setup-cli@v1
- run: supabase init
- run: supabase db start
- name: Verify generated types match Postgres schema
run: |
supabase gen types typescript --local > schema.gen.ts
if ! git diff --ignore-space-at-eol --exit-code --quiet schema.gen.ts; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
Release job to push schema changes to a Supabase project:
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
# Retrieve <project-id> from dashboard url: https://app.supabase.com/project/<project-id>
PROJECT_ID: <project-id>
steps:
- uses: supabase/setup-cli@v1
- run: supabase link --project-ref $PROJECT_ID
- run: supabase db push
Develop
After you've cloned the repository to your local machine or codespace, you'll need to perform some initial setup steps before you can develop your action.
Note
You'll need to have a reasonably modern version of Node.js handy (20.x or later should work!). If you are using a version manager like
nodenvorfnm, this template has a.node-versionfile at the root of the repository that can be used to automatically switch to the correct version when youcdinto the repository. Additionally, this.node-versionfile is used by GitHub Actions in anyactions/setup-nodeactions.
-
🛠️ Install the dependencies
npm ci -
🏗️ Package the TypeScript for distribution
npm run bundle -
✅ Run the tests
$ npm test PASS ./index.test.js ✓ gets download url to binary (3 ms) ✓ runs main action (891 ms) ...
Publish to a distribution branch
Actions are run from this GitHub repository so we will checkin the packed dist
folder.
- Create a new GitHub release
- Rebase
v1branch onmain
Your action is now published! 🚀
See the versioning documentation
Validate
You can now validate the action by referencing ./ in a workflow in your
repository (see test.yml)
uses: ./
with:
version: latest
See the actions tab for runs of this action! 🚀