Skip to content

Commit c3b831f

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

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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: Login to Registry
15+
uses: docker/login-action@v3
16+
with:
17+
registry: ghcr.io
18+
username: ${{ github.repository_owner }}
19+
password: ${{ github.token }}
20+
21+
- name: Workbench up
22+
uses: ./

action.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
--detach \
44+
--name ${{ inputs.environment }} \
45+
--env-dir ${{ inputs.environment-dir }} \
46+
${{ inputs.build == 'true' && '--build' || '' }} \
47+
${{ inputs.no-cache == 'true' && '--no-cache' || '' }}

0 commit comments

Comments
 (0)