Skip to content

Commit 09205b5

Browse files
committed
feat: GitHub Actions support
1 parent d79964a commit 09205b5

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
3+
name: tests
4+
5+
on: push
6+
7+
jobs:
8+
test-action:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Workbench up
15+
uses: ./

action.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Workbench Up
2+
3+
description: "Run workbench up with default configuration to start S3C workbench environment"
4+
5+
inputs:
6+
environment:
7+
description: "Name of the environment to start (defaults to 'default')"
8+
required: false
9+
default: "default"
10+
environment-dir:
11+
description: "Directory to store the environment"
12+
required: false
13+
default: "env"
14+
build:
15+
description: "Build images before starting containers"
16+
required: false
17+
default: "false"
18+
no-cache:
19+
description: "Do not use cache when building images"
20+
required: false
21+
default: "false"
22+
23+
runs:
24+
using: "composite"
25+
steps:
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v4
29+
with:
30+
go-version: '1.24.3'
31+
32+
- name: Build workbench
33+
shell: bash
34+
run: |
35+
make build
36+
sudo mv workbench /usr/local/bin/workbench
37+
working-directory: ${{ github.action_path }}
38+
39+
- name: Start workbench environment
40+
shell: bash
41+
run: >
42+
workbench up
43+
--name ${{ inputs.environment }}
44+
--env-dir ${{ inputs.environment-dir }}
45+
${{ inputs.build == 'true' && '--build' || '' }}
46+
${{ inputs.no-cache == 'true' && '--no-cache' || '' }}

0 commit comments

Comments
 (0)