File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 1
1
name : cleanup caches
2
2
on :
3
- pull_request :
4
- types :
5
- - closed
6
3
workflow_dispatch : # Adding manual trigger option
7
4
8
5
jobs :
31
28
done
32
29
echo "Done"
33
30
env :
34
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31
+ GH_TOKEN : ${{ secrets.TOKEN }}
35
32
GH_REPO : ${{ github.repository }}
Original file line number Diff line number Diff line change 1
1
import { VERSION } from "remotion/version" ;
2
+ import * as fs from 'fs' ;
2
3
3
4
/**
4
5
* Use autocomplete to get a list of available regions.
5
6
* @type {import('@remotion/lambda').AwsRegion }
6
7
*/
7
8
8
- const readSecretFile = async ( path ) => {
9
- // During build time or when path is undefined, return the path itself
10
- if ( ! path || process . env . NODE_ENV === 'development' ) {
11
- return path ;
12
- }
13
9
14
- // Only import fs when we actually need to read files
15
- // This prevents issues during build time
16
- const fs = await import ( 'fs' ) . then ( m => m . default ) . catch ( ( ) => null ) ;
17
-
18
- if ( ! fs ) {
19
- console . warn ( 'File system module not available, returning path as is' ) ;
10
+ const readSecretFile = ( path ) => {
11
+ if ( process . env . NODE_ENV === 'development' ) {
20
12
return path ;
21
13
}
22
-
23
14
try {
24
15
return fs . readFileSync ( path , 'utf8' ) . trim ( ) ;
25
16
} catch ( error ) {
26
17
console . error ( `Error reading secret file ${ path } :` , error ) ;
27
- return path ; // Return path instead of throwing during build
18
+ throw error ;
28
19
}
29
20
} ;
30
21
You can’t perform that action at this time.
0 commit comments