Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/actions/push-registry-app-files-supabase/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Push registry app files to Supabase

This action pushes new and modified `*.app.mjs/*.app.ts` files to Supabase.

## Inputs

### `changed_files`

**Required** List of changed files.

### `supabase_anon_key`

**Required** Supabase key

```
...
with:
format: json
```

Comment on lines +15 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add language specifier to the code block.

The code block is missing a language specifier, which affects syntax highlighting and documentation consistency.

Apply this diff:

-```
+```json
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

15-15: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

in that way `steps.changed_files.outputs.all` will be converted into an array of strings

## Example usage

```yaml
- name: Upload modified or newly added *.app.mjs files to Supabase
uses: ./.github/actions/push-registry-app-files-supabase
with:
changed_files: ${{ steps.changed_files.outputs.all }}
supabase_anon_key: ${{ secrets.SUPABASE_ANON_KEY }}
```

## Local Development + Build

Run the following command from this action directory to update `dist/index.js` if `src/index.js` has been modified:
```bash
cd .github/actions/push-registry-app-files-supabase
npm run dev
```

The above command will build and run the dist/index.js. Commit the `dist` directory.
You might want to change the `on` trigger to `push` event on your local branch when making changes to the action so you
can test it on GitHub:

## Master
```yaml
# .github/workflows/push-registry-app-files-supabase.yaml
on:
pull_request:
branches:
- master
paths:
- 'components/**'
```

## During development
```yaml
# .github/workflows/push-registry-app-files-supabase.yaml
on:
push:
branches:
- feature-branch-name
paths:
- 'components/**'
- '.github/actions/push-registry-app-files-supabase/**'
```

12 changes: 12 additions & 0 deletions .github/actions/push-registry-app-files-supabase/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Push registry app files to Supabase"
description: "Push registry app files that have changed to Supabase. If any *app.ts files have changed, run pnpm build for the affected app to generate the *.app.mjs file."
inputs:
changed_files:
description: "List of all changed files coming from the push_to_supabase job of a github action workflow"
required: true
supabase_anon_key:
description: "Supabase anon key"
required: true
runs:
using: "node16"
main: "dist/index.js"
Loading
Loading