Create a set of shell files during first action run and then use them:
steps:
- name: Setup VM and cpa.sh, sync_files_cpa.sh and shutdown_cpa_vm.sh
uses: cross-platform-actions/action@v0.22.0
with:
operating_system: freebsd
architecture: x86_64
version: 13.2
cpu_count: 4
memory: 8G
# shutdown_vm: false # option removed, will be shutdown during post action
sync_files: runner-to-vm # syncing back from VM to runner via vm-to-runner is no longer applicable
shell: cpa.sh # allow to select custom name for shell file
- run: sudo pkg update
shell: cpa.sh {0}
- run: sudo pkg install -y cmake
shell: cpa.sh {0}
# manual sync
- run: sync_files_cpa.sh vm-to-runner
# VM will be shutdown automatically in the end of a run (via post job),
# but it can be disabled manually to free the resources for possible next steps
- run: shutdown_cpa_vm.sh
Create a set of shell files during first action run and then use them:
Inspired by https://github.com/jirutka/setup-alpine
The motivation is to allow using same steps within a big matrix of jobs across multiple platforms.