1- const core = require ( ' @actions/core' ) ;
2- const tc = require ( ' @actions/tool-cache' ) ;
3- const io = require ( ' @actions/io' ) ;
4- const { execSync } = require ( ' child_process' ) ;
1+ const core = require ( " @actions/core" ) ;
2+ const tc = require ( " @actions/tool-cache" ) ;
3+ const io = require ( " @actions/io" ) ;
4+ const { execSync } = require ( " child_process" ) ;
55
66const workspace = process . env . GITHUB_WORKSPACE ;
77const binDir = `${ workspace } /bin` ;
88
9- run ( ) . catch ( error => {
9+ run ( ) . catch ( ( error ) => {
1010 core . setFailed ( error . message ) ;
11- } )
11+ } ) ;
1212
1313async function run ( ) {
1414 switch ( process . platform ) {
1515 case "win32" : {
16- const url = 'https://cli.doppler.com/download?os=windows&arch=amd64&format=zip' ;
16+ const url =
17+ "https://cli.doppler.com/download?os=windows&arch=amd64&format=zip" ;
1718 await installZip ( binDir , url ) ;
1819 break ;
1920 }
2021 case "linux" :
2122 case "darwin" : {
22- await executeInstallSh ( binDir )
23+ await executeInstallSh ( binDir ) ;
2324 break ;
2425 }
2526 default : {
@@ -37,15 +38,17 @@ async function installZip(path, url) {
3738
3839async function executeInstallSh ( installPath ) {
3940 // download script
40- const url = "https://cli.doppler.com/install.sh" ;
41+ const url =
42+ "https://github.com/DopplerHQ/cli/releases/download/3.75.0/doppler_3.75.0_linux_amd64.deb" ;
4143 const downloadPath = await tc . downloadTool ( url ) ;
4244 execSync ( `chmod +x ${ downloadPath } ` ) ;
45+ execSync ( `dpkg -i ${ downloadPath } ` ) ;
4346
4447 // execute script
45- await io . mkdirP ( installPath ) ;
46- const installCommand = `${ downloadPath } --debug --no-package-manager --install-path ${ installPath } `
47- stdout = execSync ( installCommand , { timeout : 30000 } ) ;
48- console . log ( Buffer . from ( stdout ) . toString ( "utf-8" ) )
48+ // await io.mkdirP(installPath);
49+ // const installCommand = `${downloadPath} --debug --no-package-manager --install-path ${installPath}`;
50+ // stdout = execSync(installCommand, { timeout: 30000 });
51+ // console.log(Buffer.from(stdout).toString("utf-8"));
4952
5053 // add binary to PATH
5154 core . addPath ( installPath ) ;
0 commit comments