Skip to content

Commit c8e7cf0

Browse files
committed
add minimal CI
Without checks as current commodore alias needs a context minikube and a lot more just to add a component. At least you just have to look into ci logs to see if something is more broken than before. Allow to disable docker interactive parts, new and compile work without.
1 parent b47aa02 commit c8e7cf0

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
push:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
env:
7+
COMMODORE_INTERACTIVE: "--interactive=false"
8+
COMMODORE_TTY: "--tty=false"
9+
10+
jobs:
11+
12+
check-commands:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
16+
17+
- run: ./0_requirements.sh || true
18+
19+
- run: |
20+
export SSH_AUTH_SOCK=/tmp/ssh_agent.sock
21+
touch $SSH_AUTH_SOCK
22+
23+
set -x
24+
set +e
25+
source commodore_command.sh
26+
commodore component new fortune
27+
ls -R dependencies/fortune
28+
commodore component compile dependencies/fortune
29+
ls -R dependencies/fortune

commodore_command.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ commodore() {
66
LIEUTENANT_URL=$(curl http://localhost:4040/api/tunnels --silent | jq -r '.["tunnels"][0]["public_url"]')
77
LIEUTENANT_TOKEN=$(kubectl --context minikube --namespace lieutenant get secret "$(kubectl --context minikube --namespace lieutenant get sa api-access-synkickstart -o go-template='{{(index .secrets 0).name}}')" -o go-template='{{.data.token | base64decode}}')
88

9-
docker run \
10-
--interactive=true \
11-
--tty \
9+
interactive=${COMMODORE_INTERACTIVE:-"--interactive=true"}
10+
tty=${COMMODORE_TTY:-"--tty"}
11+
12+
docker run $interactive $tty \
1213
--rm \
1314
--user="$(id -u)" \
1415
--env COMMODORE_API_URL="$LIEUTENANT_URL" \

0 commit comments

Comments
 (0)