Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use different syntax for multiple steps feature #83

Open
Xottab-DUTY opened this issue Feb 11, 2024 · 1 comment
Open

Use different syntax for multiple steps feature #83

Xottab-DUTY opened this issue Feb 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Xottab-DUTY
Copy link

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

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.

@jacob-carlborg
Copy link
Contributor

Interesting, I didn't know this was possible.

@jacob-carlborg jacob-carlborg added the enhancement New feature or request label Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants