File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,13 +234,38 @@ Support custom shell:
234234 - name: Custom shell step 1
235235 shell: {0}
236236 run: |
237- cd $GITHUB_WORKSPACE;
238237 pwd
239238 echo "this is step 1, running inside the VM"
240239 - name: Custom shell step 2
241240 shell: {0}
242241 run: |
243- cd $GITHUB_WORKSPACE;
242+ pwd
243+ echo "this is step 2, running inside the VM"
244+ ...
245+ ` ` `
246+
247+ The custom shell will automatically `cd` into `$GITHUB_WORKSPACE` if it exists before running your commands.
248+
249+ You can also use `custom-shell-name` to set a custom name for the shell wrapper :
250+
251+ ` ` ` yaml
252+ ...
253+ steps:
254+ - uses: actions/checkout@v6
255+ - name: Start VM
256+ id: vm
257+ uses: vmactions/base-vm@v0
258+ with:
259+ sync: nfs
260+ custom-shell-name: vmsh
261+ - name: Custom shell step 1
262+ shell: vmsh {0}
263+ run: |
264+ pwd
265+ echo "this is step 1, running inside the VM"
266+ - name: Custom shell step 2
267+ shell: vmsh {0}
268+ run: |
244269 pwd
245270 echo "this is step 2, running inside the VM"
246271...
You can’t perform that action at this time.
0 commit comments