dependabot[bot] 2aafc5b701 Bump @actions/core from 1.9.0 to 1.9.1 (#13)
* Bump @actions/core from 1.9.0 to 1.9.1

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update dist

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Qiao Han <qiao@supabase.io>
2022-08-09 01:27:49 +00:00
2022-08-03 23:08:46 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00
2022-08-03 21:32:01 +08:00

⚙️ Supabase CLI Action

About

This action sets up the Supabase CLI, supabase, on GitHub's hosted Actions runners.

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

Run supabase start to execute all migrations on a fresh database:

steps:
  - uses: supabase/setup-cli@v1
    with:
      version: 0.34.2
  - run: supabase init
  - run: supabase 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:

  • version: The version of supabase to install, defaulting to 0.34.2

Advanced Usage

Check generated TypeScript types are up-to-date with Postgres schema:

steps:
  - uses: supabase/setup-cli@v1
  - run: supabase init
  - run: supabase start
  - name: Verify generated types match Postgres schema
    run: |
      supabase gen types typescript --local > schema.gen.ts
      if [ "$(git diff --ignore-space-at-eol schema.gen.ts | wc -l)" -gt "0" ]; 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:

steps:
  - uses: supabase/setup-cli@v1
  - run: supabase init
  - run: supabase db remote set ${{ secrets.DB_URL }}
  - run: supabase db push

Develop

Requires node >= 16

Install the dependencies

$ npm install

Build the typescript and package it for distribution

$ npm run build && npm run package

Run the tests ✔️

$ npm test

 PASS  __tests__/main.test.ts
  ✓ gets download url to binary (3 ms)test runs (891 ms)

...

Publish to a distribution branch

Actions are run from GitHub repos so we will checkin the packed dist folder.

Then run ncc and push the results:

$ npm run package
$ git add dist
$ git commit -a -m "Update dependencies"
$ git push origin releases/v1

Note: We recommend using the --license option for ncc, which will create a license file for all of the production node modules used in your project.

Your action is now published! 🚀

See the versioning documentation

Validate

You can now validate the action by referencing ./ in a workflow in your repo (see test.yml)

uses: ./
with:
  version: 0.34.2

See the actions tab for runs of this action! 🚀

Description
Supabase CLI Setup Action
Readme MIT 4.2 MiB
Languages
TypeScript 62.8%
JavaScript 37.2%