Skip to content

Update index.js

Update index.js #12

name: Push Registry App Files to Supabase
on:
push:
branches:
- biz/dj-2899-create-a-github-action-to-upsert-any-changed-app-files-into
paths:
- 'components/**'
- '.github/actions/push-registry-app-files-supabase/**'
jobs:
push_to_supabase:
name: Push registry app files to Supabase if they have been modified
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/[email protected]
name: Checkout repo
with:
# https://github.com/actions/checkout/issues/266#issuecomment-638346893
fetch-depth: 0
- uses: pnpm/[email protected]
with:
version: 9.14.2
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup Node Env
uses: actions/[email protected]
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- uses: Ana06/[email protected]
id: changed_files
name: Get changed files
with:
format: json
- 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 }}