Skip to content

Commit cdf8b2b

Browse files
committed
fix test
1 parent 3564e89 commit cdf8b2b

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
- uses: actions/checkout@v3
2626
- uses: ./
2727
with:
28-
file_path: '/home/runner/work/status-base/upload-file-to-supabase-storage/desktop1200x900.jpeg'
28+
file_path: 'desktop1200x900.jpeg'
2929
bucket: 'website'
3030
upsert: 'true'

dist/index.js

Lines changed: 10 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "upload-to-supabase-storage",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"private": true,
55
"description": "Upload local file to Supabase Storage",
66
"main": "lib/main.js",

src/main.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as core from '@actions/core'
2-
import {basename} from 'path'
2+
import {basename, isAbsolute} from 'path'
33
import {createClient} from '@supabase/supabase-js'
44
import {promises as fs} from 'fs'
55

@@ -20,8 +20,13 @@ async function run(): Promise<void> {
2020

2121
const supabase = createClient(supabaseUrl, supabaseAnonKey)
2222

23+
const filePathDir = isAbsolute(filePath)
24+
? filePath
25+
: `${process.env.GITHUB_WORKSPACE}/${filePath}`
2326
core.debug(`Reading file: ${filePath}`)
24-
const buffer = await fs.readFile(filePath)
27+
core.debug(`Reading file dir: ${filePathDir}`)
28+
29+
const buffer = await fs.readFile(filePathDir)
2530

2631
const {data, error} = await supabase.storage
2732
.from(bucket)

0 commit comments

Comments
 (0)