-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Biz/dj 2899 create a GitHub action to upsert any changed app files into #15614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 29 commits
d44dda8
1fbbe94
36569ca
8ff4502
6999a39
05fb452
b3e41f2
bb6f368
d29a860
f331971
ad3f8e1
794a23e
dbaaa9b
783c0a2
0854a39
0dca7a4
81b433e
9def150
487fca6
d3dfe93
2a96fb4
65ca9c4
82d484d
6877f35
a9370ab
be06c50
659412d
47195bc
964b1a1
4e03c04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
| ``` | ||
|
|
||
| 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/**' | ||
| ``` | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||
| 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 | ||||||
| supabase_uri: | ||||||
| description: "Supabase URI" | ||||||
| required: true | ||||||
| runs: | ||||||
| using: "node22" | ||||||
|
||||||
| using: "node22" | |
| using: "node20" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
15-15: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)