Files
redwoodjs__local-ci/scripts/agent-ci-dev.sh
T
Peter Pistorius f660c11a4d feat: support composite action step outputs and changed-files actions (#174)
* feat: support composite action step outputs and push event context

Enable workflows that use composite actions with cross-step output
references (e.g. Khan/actions@get-changed-files + filter-files) by:

- Preserving steps.* expressions for runner-time evaluation instead
  of expanding them to empty string at parse time
- Using correct BasicExpression token type (type 3, not 6) matching
  the runner's wire format
- Adding ContextName to steps so the runner can resolve
  steps.<id>.outputs.<name> expressions
- Adding push event before/after SHAs and GITHUB_API_URL so
  changed-files actions can call the compare commits API
- Implementing compare commits and list-PRs-for-commit mock endpoints
  in the DTU server using git diff on the original repo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve symlinks in agent-ci-dev.sh so it works when invoked via symlink

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 23:02:21 +02:00

21 lines
795 B
Bash
Executable File

#!/usr/bin/env bash
# Dev-only wrapper: runs agent-ci against local development code (via tsx)
# instead of the published package. Not intended for end users.
set -euo pipefail
SOURCE="${BASH_SOURCE[0]}"
while [ -L "$SOURCE" ]; do
DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE"
done
SCRIPT_DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
# Build dtu-github-actions (suppress pnpm lifecycle noise)
pnpm --silent --dir "$REPO_ROOT/packages/dtu-github-actions" run build 2>/dev/null || \
pnpm --dir "$REPO_ROOT/packages/dtu-github-actions" run build
# Run CLI from the caller's working directory
exec "$REPO_ROOT/node_modules/.bin/tsx" "$REPO_ROOT/packages/cli/src/cli.ts" "$@"