File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -22856,6 +22856,7 @@ function _getGlobal(key, defaultValue) {
2285622856}
2285722857
2285822858// src/index.ts
22859+ var fs3 = __toESM(require("node:fs"));
2285922860var path5 = __toESM(require("node:path"));
2286022861var client = new HttpClient("depot-snapshot-action");
2286122862async function run() {
@@ -22868,6 +22869,11 @@ async function run() {
2286822869 setSecret(token);
2286922870 const snapshotPath = await group("Installing snapshot tool", () => installSnapshot(version));
2287022871 await exec(snapshotPath, ["--version"]);
22872+ await group("Preparing /rw", async () => {
22873+ if (fs3.existsSync("/rw")) return;
22874+ await exec("sudo", ["mkdir", "-p", "/rw"]);
22875+ await exec("sudo", ["mount", "/dev/vda", "/rw"]);
22876+ });
2287122877 await group("Creating snapshot", async () => {
2287222878 await exec(
2287322879 "sudo",
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as core from '@actions/core'
22import * as exec from '@actions/exec'
33import * as http from '@actions/http-client'
44import * as toolCache from '@actions/tool-cache'
5+ import * as fs from 'node:fs'
56import * as path from 'node:path'
67
78type ApiResponse = { ok : true ; url : string } | { ok : false ; error : string }
@@ -21,6 +22,13 @@ async function run() {
2122 const snapshotPath = await core . group ( 'Installing snapshot tool' , ( ) => installSnapshot ( version ) )
2223 await exec . exec ( snapshotPath , [ '--version' ] )
2324
25+ await core . group ( 'Preparing /rw' , async ( ) => {
26+ if ( fs . existsSync ( '/rw' ) ) return
27+
28+ await exec . exec ( 'sudo' , [ 'mkdir' , '-p' , '/rw' ] )
29+ await exec . exec ( 'sudo' , [ 'mount' , '/dev/vda' , '/rw' ] )
30+ } )
31+
2432 await core . group ( 'Creating snapshot' , async ( ) => {
2533 await exec . exec (
2634 'sudo' ,
You can’t perform that action at this time.
0 commit comments