Skip to content

Commit 765af27

Browse files
authored
Merge pull request #720 from Ana06/vbox-ci
[CI] Add workflow to release vbox executables
2 parents c644aa8 + ba0b210 commit 765af27

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/build-vbox.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build & release vbox
2+
# Create or update a release by adding a body and the built vbox binaries on a tag creation that starts by `vbox-`.
3+
# The tag can be created in the GH UI (by creating a release) or using git, e.g.:
4+
# VERSION=1.0.0 && git tag -a vbox-$VERSION origin/main -m "vbox tag" && git push origin vbox-$VERSION
5+
6+
on:
7+
push:
8+
tags:
9+
- 'vbox-*'
10+
workflow_dispatch: # manual trigger for testing
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
build:
17+
# use old linux for better portability
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
- name: Install build requirements
23+
run: python -m pip install --upgrade pip setuptools pyinstaller pgi
24+
- name: Build standalone executables
25+
run: |
26+
cd virtualbox
27+
28+
pyinstaller --onefile --log-level DEBUG vbox-adapter-check.py
29+
pyinstaller --onefile --log-level DEBUG vbox-clean-snapshots.py
30+
31+
ls dist
32+
# Only test vbox-clean-snapshots as vbox-adapter-check uses Notify and it fails in GH actions
33+
- name: Check vbox-clean-snapshots runs correctly
34+
run: virtualbox/dist/vbox-clean-snapshots --help
35+
- name: Zip binaries
36+
run: zip -rj vbox.zip virtualbox/dist
37+
- name: Upload ZIP to release
38+
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
39+
with:
40+
repo_token: ${{ secrets.GITHUB_TOKEN }}
41+
file: vbox.zip
42+
tag: ${{ github.ref }}
43+
overwrite: true
44+
body: |
45+
**FLARE-VM does not have releases**, as the project relies on external URLs outside of our control, making it impossible to install an older version. This release only includes standalone Linux executables for some of the scripts in the [`virtualbox`](https://github.com/mandiant/flare-vm/tree/main/virtualbox) folder (related to use FLARE-VM in VirtualBox) to make them easier to use. **To install FLARE-VM check the instructions in the [FLARE-VM README](https://github.com/mandiant/flare-vm)**.
46+
47+
- **vbox-adapter-check**: Print the status of all internet adapters of all VMs in VirtualBox. Useful to detect internet access, which is undesirable for dynamic malware analysis. Compatibility is limited to Linux systems using the GTK graphical toolkit, which includes desktops like GNOME.
48+
- **vbox-clean-snapshots**: Delete a snapshot and its children recursively skipping snapshots with a substring in the name. Useful to delete several snapshots, which is not possible via the VirtualBox UI.
49+

0 commit comments

Comments
 (0)