Skip to content

Latest commit

 

History

History
52 lines (47 loc) · 2.04 KB

README.md

File metadata and controls

52 lines (47 loc) · 2.04 KB

Parallels Desktop DevOps GitHub Action

coverage Lint Codebase CI

This action allows you to run Parallels Desktop virtual machines in your GitHub Actions workflows. You can start, stop, and run commands in a VM, as well as clone, create, and delete VMs.

Usage

name: Run Parallels Desktop VM
on: [push]

jobs:
  parallels-desktop:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Pull From Catalog
        id: pull
        uses: parallels/parallels-desktop-github-action@v1
        with:
          operation: 'pull'
          username: ${{ secrets.PARALLELS_USERNAME }}
          password: ${{ secrets.PARALLELS_PASSWORD }}
          host_url: devops.example.com
          base_image:
            root:${{
            secrets.CATALOG_ROOT_PASSWORD}}@catalog.example.com/mac-github-runner/v1
      - name: Configure Github Runner
        uses: parallels/parallels-desktop-github-action@v1
        with:
          operation: 'run'
          username: ${{ secrets.PARALLELS_USERNAME }}
          password: ${{ secrets.PARALLELS_PASSWORD }}
          host_url: devops.example.com
          machine_name: ${{ steps.pull.outputs.machine_name }}
          run: |
            echo "Hello, World!"
      - name: Delete VM
        if: always()
        uses: parallels/parallels-desktop-github-action@v1
        with:
          operation: 'delete'
          username: ${{ secrets.PARALLELS_USERNAME }}
          password: ${{ secrets.PARALLELS_PASSWORD }}
          host_url: devops.example.com
          machine_name: ${{ steps.pull.outputs.machine_name }}