-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
501 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
|
||
[![Build](https://github.com/vmactions/{{VM_OS_NAME}}-builder/actions/workflows/build.yml/badge.svg)](https://github.com/vmactions/{{VM_OS_NAME}}-builder/actions/workflows/build.yml) | ||
|
||
Latest: {{LATEST_TAG}} | ||
|
||
|
||
The image builder for [{{VM_OS_NAME}}-vm](https://github.com/vmactions/{{VM_OS_NAME}}-vm) | ||
|
||
|
||
How to use: | ||
|
||
1. Use the [manual.yml](.github/workflows/manual.yml) to build manually. | ||
|
||
Run the workflow manually, you will get a view-only webconsole from the output of the workflow, just open the link in your web browser. | ||
|
||
You will also get an interactive VNC connection port from the output, you can connect to the vm by any vnc client. | ||
|
||
2. Run the builder locally on your Ubuntu machine. | ||
|
||
Just clone the repo. and run: | ||
```bash | ||
bash build.sh {{LATEST_CONF}} | ||
``` | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: "Build" | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
paths: | ||
- '*.sh' | ||
- '.github/workflows/build.yml' | ||
- '*.txt' | ||
- 'conf/*' | ||
- 'hooks/*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
paths: | ||
- '*.sh' | ||
- '.github/workflows/build.yml' | ||
- '*.txt' | ||
- 'conf/*' | ||
- 'hooks/*' | ||
workflow_dispatch: | ||
|
||
release: | ||
types: [ created ] | ||
|
||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: ["202404"] | ||
runs-on: ubuntu-24.04 | ||
env: | ||
SEC_VBOX : ${{ secrets.SEC_VBOX }} | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
- uses: actions/checkout@v4 | ||
- name: Creating Web console | ||
uses: vmactions/cf-tunnel@v0 | ||
id: tunnel | ||
with: | ||
protocol: http | ||
port: 8000 | ||
- run: | | ||
bash build.sh conf/openindiana-${{ matrix.os }}.conf | ||
- name: Upload Release Asset | ||
if: "contains(github.ref, 'refs/tags/')" | ||
id: upload-release-asset | ||
uses: softprops/action-gh-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: | | ||
openindiana-${{ matrix.os }}.qcow2.zst* | ||
openindiana-${{ matrix.os }}-id_rsa.pub | ||
openindiana-${{ matrix.os }}-host.id_rsa | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "Manual" | ||
on: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
DEBUG: 1 | ||
NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }} | ||
SEC_VBOX : ${{ secrets.SEC_VBOX }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Creating web console | ||
uses: vmactions/cf-tunnel@v0 | ||
id: tunnel | ||
with: | ||
protocol: http | ||
port: 8000 | ||
- name: Run vnc tunnel | ||
id: test | ||
uses: vmactions/ngrok-tunnel@v0 | ||
with: | ||
protocol: tcp | ||
port: 5900 | ||
- name: Sleep | ||
run: | | ||
for i in $(seq 1 10) ; do echo $i; sleep 1; done | ||
latest=$(cat $(ls conf/openindiana-*.conf | tail -1) | grep VM_RELEASE | cut -d = -f 2) | ||
echo "please loging to ssh below, and run:" | ||
echo "=============================" | ||
echo "bash build.sh conf/openindiana-$latest.conf" | ||
echo "=============================" | ||
touch /tmp/keepalive | ||
- uses: neilpang/debugger-action@master | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: "Update Readme" | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- '.github/tpl/*' | ||
- '.github/data/*' | ||
- '.github/workflows/readme.yml' | ||
|
||
release: | ||
types: [ published ] | ||
|
||
|
||
jobs: | ||
readme: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get latest release | ||
id: get-latest-release | ||
uses: InsonusK/[email protected] | ||
with: | ||
myToken: ${{ github.token }} | ||
view_top: 1 | ||
|
||
- name: Using main branch | ||
run: | | ||
git switch main || (git fetch --all && git checkout -b main origin/main) | ||
echo "LATEST_MAJOR=$(echo ${{ steps.get-latest-release.outputs.tag_name }} | cut -d . -f 1)" >> $GITHUB_ENV | ||
echo "LATEST_TAG=${{ steps.get-latest-release.outputs.tag_name }}" >> $GITHUB_ENV | ||
latest=$(ls conf/*.conf | tail -1) | ||
echo "LATEST_CONF=$latest" >> $GITHUB_ENV | ||
- name: Update the readme.md | ||
uses: vmactions/[email protected] | ||
with: | ||
datafile: .github/data/datafile.ini | ||
files: | | ||
.github/tpl/README.tpl.md : README.md | ||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: "Update version to ${{ steps.get-latest-release.outputs.tag_name }}" | ||
pull: '--rebase --autostash ' | ||
add: | | ||
README.md | ||
Oops, something went wrong.