CI/CD

DevInCi instellen in GitHub Actions

Published:
Kelvin Wuite
By Kelvin Wuite β€’ 7 min read
Share

Als een GitHub Actions job faalt is de gebruikelijke workflow: logs lezen, gokken, fix pushen, wachten, herhalen. DevInCi vervangt die cyclus met een live terminal of VS Code IDE in de runner zelf. Je klikt op een URL en debugt in exact de omgeving waar de failure optrad.

Wat je krijgt

  • Web terminal (ttyd) β€” volledige shell in je browser, geen SSH keys
  • VS Code (code-server) β€” browser IDE met extensies en debugger
  • Beveiligde tunnel URL β€” HTTPS met ingebedde credentials, deelbaar met teamleden
  • Auto-provisioning β€” credentials, tunnel server en URL worden automatisch afgehandeld

De action is beschikbaar op de GitHub Marketplace β€” zoek naar "ASD DevInCi" of ga naar github.com/marketplace/actions/asd-devinci. Werkt op Ubuntu, macOS en Windows runners.

Vereisten

  • Een ASD account (asd.host/workspace)
  • Een API key met cicd:provision scope
  • Een GitHub repository met Actions ingeschakeld

Stap 1: Maak een API key

  1. Ga naar asd.host/workspace/api-keys
  2. Klik op Create API Key
  3. Activeer de cicd:provision scope
  4. Kopieer de key β€” je ziet deze niet meer

Stap 2: Voeg de key toe als repository secret

  1. Ga naar je repository β†’ Settings β†’ Secrets and variables β†’ Actions
  2. Klik op New repository secret
  3. Name: ASD_API_KEY
  4. Value: plak je API key

Stap 3: Voeg DevInCi toe aan je workflow

Voeg de DevInCi stap toe na je test commando. Deze draait alleen als de vorige stap faalt:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test

      - name: DevInCi β€” Debug on failure
        if: failure()
        uses: asd-engineering/asd-devinci@v1
        with:
          api-key: ${{ secrets.ASD_API_KEY }}

Dat is alles. Als de test stap faalt start DevInCi een web terminal en print een URL in de job logs.

Stap 4: Open de sessie

Wanneer je workflow faalt, doet DevInCi automatisch:

  1. ASD CLI installeren
  2. Tunnel credentials aanmaken via je API key
  3. Web terminal (ttyd) starten
  4. Beveiligde tunnel verbinden
  5. Sessie URL printen in de job logs

Klik op de URL om een live terminal te openen in je browser. De credentials zitten in de URL, dus authenticatie is automatisch. Secrets worden gemaskeerd in logs via ::add-mask::.

VS Code in plaats van terminal

Stel de interface input in op codeserver voor een volledige VS Code IDE:

- name: DevInCi β€” VS Code on failure
  if: failure()
  uses: asd-engineering/asd-devinci@v1
  with:
    api-key: ${{ secrets.ASD_API_KEY }}
    interface: codeserver
    tunnel-name: vscode-${{ github.run_id }}

On-demand sessies

Trigger DevInCi handmatig in plaats van te wachten op een failure. Maak een aparte workflow met workflow_dispatch:

name: Development Environment

on:
  workflow_dispatch:
    inputs:
      ttl:
        description: 'Sessie duur (minuten)'
        default: '30'

jobs:
  dev:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install

      - name: Start DevInCi
        uses: asd-engineering/asd-devinci@v1
        with:
          api-key: ${{ secrets.ASD_API_KEY }}
          interface: codeserver
          tunnel-name: dev-${{ github.actor }}
          ttl-minutes: ${{ github.event.inputs.ttl }}

Ga naar je repository β†’ Actions β†’ selecteer de workflow β†’ Run workflow.

Debug een specifieke falende job

Gebruik continue-on-error om de workflow draaiend te houden na een test failure, en check dan de outcome:

jobs:
  debug:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run tests
        id: tests
        run: npm test
        continue-on-error: true

      - name: Start DevInCi on failure
        if: steps.tests.outcome == 'failure'
        uses: asd-engineering/asd-devinci@v1
        with:
          api-key: ${{ secrets.ASD_API_KEY }}
          tunnel-name: debug-${{ github.run_id }}

Action outputs gebruiken

DevInCi biedt outputs die je kunt gebruiken in volgende stappen:

- name: Start DevInCi
  id: devinci
  if: failure()
  uses: asd-engineering/asd-devinci@v1
  with:
    api-key: ${{ secrets.ASD_API_KEY }}

- name: Notify team
  if: failure()
  run: |
    echo "Debug URL: ${{ steps.devinci.outputs.url }}"
    echo "Verloopt: ${{ steps.devinci.outputs.expires-at }}"
OutputBeschrijving
urlSessie URL met ingebedde credentials
url-baseSessie URL zonder credentials
tunnel-userTunnel client ID
local-portLokale service poort
expires-atToken expiratie (ISO 8601)

Configuratie opties

InputBeschrijvingDefault
api-keyASD API key met cicd:provision scopeβ€”
interfacettyd (terminal) of codeserver (VS Code)ttyd
shellbash, zsh of powershellbash
usernameBasic auth gebruikersnaamasd
passwordBasic auth wachtwoord (automatisch gegenereerd als leeg)β€”
tunnel-nameSubdomein prefixKorte SHA
ttl-minutesSessie TTL in minuten (0 = geen expiry)0
regionTunnel server regioAuto

Troubleshooting

"Failed to provision credentials"

  1. Controleer of je API key de cicd:provision scope heeft
  2. Check of de key niet verlopen is
  3. Bevestig dat ASD_API_KEY is ingesteld in repository secrets

"Tunnel connection failed"

  1. Controleer of de runner uitgaande SSH op poort 2223 toestaat
  2. Probeer een andere regio als beschikbaar

Samenvatting

Voeg de asd-engineering/asd-devinci action toe aan elke workflow. Als een job faalt, klik op de URL en debug in exact de runner omgeving. Geen SSH keys, geen handmatige setup.

Kelvin Wuite
Written by

Kelvin Wuite

Kelvin Wuite is the founder of ASD B.V. With over eighteen years of development experience, he has witnessed the same patterns repeat across every software team - endless documentation, manual preparation, environment mismatches, and fragmented collaboration. His drive is to remove these barriers, enabling engineers to work together in unified environments with shorter feedback loops and hands-on collaboration. Since 2015 he has been refining these ideas, leading to ASD β€” a platform designed to create a faster, more integrated way for development teams to collaborate in an age where AI is thriving.

Related Articles