Skip to content

Upload file to Supabase Storage

Actions
Upload file to Supabase Storage with GitHub Actions
v1.0.3
Latest
Star (9)

upload-file-to-supabase-storage status

Upload file to Supabase Storage

You may want to perform some screenshot, or generate txt file and store those data to Supabase Bucket, and this is the tools for you!

Inputs

file_path

Path name of the file to be uploaded.

eg: "public/screenshots.png"

bucket

Name of the bucket to upload to

eg: "screenshot"

content_type

Supabase Storage from.upload fileOptions parameter, the Content-Type header value.

eg: "image/png"

cache_control

Supabase Storage from.upload fileOptions parameter, the Content-Control value.

eg: "3600"

upsert

Supabase Storage from.upload fileOptions parameter, the Upsert value.

eg: "true"

Env

SUPABASE_URL

Go to Dashboard Settings, copy and paste the URL into GitHub Repo's secret.

SUPABASE_ANON_KEY

Go to Dashboard Settings, copy and paste the Anon Key into GitHub Repo's secret.

Usage/Example

In .github/workflows/screenshot.yml

name: Screenshot Action
on:
  push:
    branches: -master

env:
  SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
  SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}

jobs:
  screenshots:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Screenshot Website
        id: screenshot
        uses: swinton/[email protected]
        with:
          source: https://github.com
          destination: screenshot.png

      - name: Upload image to Storage
        uses: status-base/[email protected]
        with:
          file_path: ${{ steps.screenshot.outputs.path }}  // generated from previous step
          bucket: website
          content_type: image/png
          upsert: true

Upload file to Supabase Storage is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Upload file to Supabase Storage with GitHub Actions
v1.0.3
Latest

Upload file to Supabase Storage is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.