feat: add create-channel and get-vm-ssh-endpoint actions; update expose-port for VM ID #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test - create-vm | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - create-vm/** | |
| - remove-vm/** | |
| - .github/workflows/test-create-vm.yml | |
| concurrency: | |
| group: test-create-vm-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "npm" | |
| cache-dependency-path: | | |
| **/package-lock.json | |
| - name: build | |
| run: make package-create-vm package-remove-vm | |
| - name: test create-vm | |
| id: create-vm | |
| uses: ./create-vm | |
| with: | |
| api-token: ${{ secrets.REPLICATED_API_TOKEN }} | |
| distribution: ubuntu | |
| ttl: 10m | |
| timeout-minutes: 10 | |
| - name: remove vm | |
| if: always() | |
| uses: ./remove-vm | |
| continue-on-error: true # It could be that the vm is already removed | |
| with: | |
| api-token: ${{ secrets.REPLICATED_API_TOKEN }} | |
| vm-id: ${{ steps.create-vm.outputs.vm-id }} |