From 3daaf28bda77f48962f1eedd12c23d61c90989c0 Mon Sep 17 00:00:00 2001 From: "Generate.yml" Date: Sun, 6 Oct 2024 12:39:50 +0000 Subject: [PATCH] Generated from base-vm --- .github/tpl/README.tpl.md | 15 +++++++++++++-- .github/workflows/test.yml | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/tpl/README.tpl.md b/.github/tpl/README.tpl.md index af7c465..ce657b5 100644 --- a/.github/tpl/README.tpl.md +++ b/.github/tpl/README.tpl.md @@ -4,10 +4,10 @@ Use this action to run your CI in {{VM_NAME}}. The github workflow only supports Ubuntu, Windows and MacOS. But what if you need to use {{VM_NAME}}? -This action is to support {{VM_NAME}}. -Sample workflow `test.yml`: + +## 1. Example: `test.yml`: ```yml @@ -64,6 +64,10 @@ So, you will have the same directory and same default env variables when you `ru {{VM_SHELL_COMMENTS}} + + +## 2. Share code + The code is shared from the host to the VM via `rsync` by default, you can choose to use to `sshfs` share code instead. @@ -121,6 +125,7 @@ When using `rsync`, you can define `copyback: false` to not copy files back fro ``` +## 3. NAT from host runner to the VM You can add NAT port between the host and the VM. @@ -142,6 +147,8 @@ You can add NAT port between the host and the VM. ``` +## 4. Set memory and cpu + The default memory of the VM is 6144MB, you can use `mem` option to set the memory size: ``` @@ -175,6 +182,9 @@ The VM is using all the cpu cores of the host by default, you can use `cpu` opti ... ``` + +## 5. Select release + It uses [the {{VM_NAME}} {{DEFAULT_RELEASE}}](conf/default.release.conf) by default, you can use `release` option to use another version of {{VM_NAME}}: ``` @@ -193,6 +203,7 @@ All the supported releases are here: {{VM_NAME}} {{ALL_RELEASES}} [See all here +## 6. Custom shell Support custom shell: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c219090..b206e4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: port: 8000 - name: Test in OpenBSD id: test - uses: vmactions/openbsd-vm@b6a219e7f0d7e579240c22a65b2d823f22b0e500 + uses: vmactions/openbsd-vm@93693719e20da8ae25ff0f268a613652561dc287 with: envs: 'DEBUG MYTOKEN MYTOKEN2' prepare: | @@ -117,7 +117,7 @@ jobs: - uses: actions/checkout@v4 - name: Test in OpenBSD id: test - uses: vmactions/openbsd-vm@b6a219e7f0d7e579240c22a65b2d823f22b0e500 + uses: vmactions/openbsd-vm@93693719e20da8ae25ff0f268a613652561dc287 with: envs: 'MYTOKEN MYTOKEN2' prepare: |