GitHub Actions y CI/CD · CLI cifrada

Protege despliegues a producción.
Con Face ID en tu iPhone.

Agrega un paso de la CLI de NotiBuddy en GitHub Actions para recibir aprobaciones cifradas y avisos de compilación directo en tu iPhone—sin bots de Slack ni cuentas.

iOS 17+ y watchOS 10+ · Plan Gratis incluido · Referencia completa de configuración

Captura en Dark Mode de una aprobación ¿Implementar v2.4.1? protegida con Face ID en NotiBuddy.
Cada respuesta se firma en tu teléfono y el workflow la verifica antes de continuar.

Recomendado · 30 segundos

Configuración rápida: pega esto en tu agente de código

Tu agente leerá /github-actions.md, te guiará para crear una clave dedicada de CI y agregará un paso de aprobación con fallo cerrado.

Tu agente leerá las instrucciones detalladas en notibuddy.app/github-actions.md (Markdown sin formato, en inglés).

O agrega el paso de GitHub Actions manualmente

Vincula una clave dedicada para CI una vez, guarda su JSON en un Secret de un Environment protegido (NOTIBUDDY_CI_DESTINATION) y agrega esta compuerta con Face ID y fallo cerrado:

.github/workflows/deploy.yml
- name: Configurar Node.js
  uses: actions/setup-node@v4
  with:
    node-version: '20'

- name: Pedir aprobación con Face ID en iPhone
  shell: bash
  timeout-minutes: 15
  env:
    NOTIBUDDY_DEST_JSON: ${{ secrets.NOTIBUDDY_CI_DESTINATION }}
    APPROVE_OPTION: Aprobar
    DECLINE_OPTION: Rechazar
    TIMEOUT_SECONDS: '600'
    REF_NAME: ${{ github.ref_name }}
    COMMIT_SHA: ${{ github.sha }}
    REPO_NAME: ${{ github.repository }}
    ACTOR: ${{ github.actor }}
    RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  run: |
    set -euo pipefail
    if [ -z "$NOTIBUDDY_DEST_JSON" ]; then
      echo "::error::Falta el secret NOTIBUDDY_CI_DESTINATION."
      exit 1
    fi

    umask 077
    export NOTIBUDDY_HOME="${RUNNER_TEMP:-/tmp}/notibuddy-$$"
    NB_PREFIX="${RUNNER_TEMP:-/tmp}/notibuddy-cli-$$"
    trap 'rm -rf "$NOTIBUDDY_HOME" "$NB_PREFIX"' EXIT

    mkdir -p "$NOTIBUDDY_HOME/destinations" "$NB_PREFIX"
    printf '%s' "$NOTIBUDDY_DEST_JSON" > "$NOTIBUDDY_HOME/destinations/ci.json"
    npm --prefix "$NB_PREFIX" install --no-save --silent notibuddy@^0.4.0 >/dev/null

    "$NB_PREFIX/node_modules/.bin/nb" gate "¿Desplegar ${REF_NAME}?" \
      --to ci \
      --sender "GitHub Actions" \
      --message "${REPO_NAME} · ${COMMIT_SHA:0:7} por ${ACTOR} · ${RUN_URL}" \
      --approve "${APPROVE_OPTION}" \
      --reject "${DECLINE_OPTION}" \
      --requires-auth \
      --timeout "${TIMEOUT_SECONDS}"
Opcional: aviso inmediato al fallar un workflow (sin espera)

Usa nb notify sin --options para enviar una notificación cifrada en un solo sentido sin consumir minutos esperando:

- name: Avisar en iPhone si falla el workflow
  if: failure()
  shell: bash
  env:
    NOTIBUDDY_DEST_JSON: ${{ secrets.NOTIBUDDY_CI_DESTINATION }}
    REF_NAME: ${{ github.ref_name }}
    REPO_NAME: ${{ github.repository }}
    RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  run: |
    set -euo pipefail
    umask 077
    export NOTIBUDDY_HOME="${RUNNER_TEMP:-/tmp}/notibuddy-$$"
    NB_PREFIX="${RUNNER_TEMP:-/tmp}/notibuddy-cli-$$"
    trap 'rm -rf "$NOTIBUDDY_HOME" "$NB_PREFIX"' EXIT
    mkdir -p "$NOTIBUDDY_HOME/destinations" "$NB_PREFIX"
    printf '%s' "$NOTIBUDDY_DEST_JSON" > "$NOTIBUDDY_HOME/destinations/ci.json"
    npm --prefix "$NB_PREFIX" install --no-save --silent notibuddy@^0.4.0 >/dev/null
    "$NB_PREFIX/node_modules/.bin/nb" notify "Falló CI en ${REF_NAME}" \
      --to ci \
      --sender "GitHub Actions" \
      --message "${REPO_NAME} · ${RUN_URL}"

Actívalo en 3 pasos

1

Crea una clave dedicada para CI

Vincula una conexión aparte con npx -y notibuddy@^0.4.0 pair --to ci --label "GitHub Actions" y comprueba con doctor --to ci para revocarla por separado desde Conectar.

2

Guarda ci.json en un Environment Secret

Guarda el contenido completo de ~/.notibuddy/destinations/ci.json como NOTIBUDDY_CI_DESTINATION en un Environment con reglas de rama. Puedes borrar el archivo local después, pero no desconectes esa clave en tu iPhone.

3

Fallo cerrado automático con nb gate

nb gate maneja la espera en múltiples ventanas con un solo request ID firmado hasta --timeout y solo sale con código 0 si recibe una aprobación verificada con Face ID (2 al rechazar o faltar autenticación, 3 al vencer, 1 por error).

Casos clave para DevOps

Pantallas de despliegue

Tableros nativos con Face ID

Usa nb notify --screen (o nb gate --requires-auth) para revisar métricas canary, listas previas y detalles del commit en tu iPhone antes de promover a producción.

Terraform y BD

Controla cambios de infraestructura

Envía el resumen del plan o el diff del esquema a tu teléfono antes de correr terraform apply.

Avisos al instante

Notificaciones de éxito o fallo

Omite --options para enviar un aviso cifrado en cuanto termine o falle un pipeline largo.