Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

The features.action-mode: "script" frontmatter field enables direct shell script execution for custom actions but was undocumented.

Changes

User documentation (docs/src/content/docs/reference/frontmatter.md)

  • Added features.action-mode subsection documenting all three modes (dev, release, script)
  • Documented script mode behavior: checks out githubnext/gh-aw repository, runs setup.sh directly
  • Specified configuration precedence: CLI flag > feature flag > environment variable > auto-detection

Technical specification (specs/actions.md)

  • Updated "Compiler Integration" section to cover all action modes
  • Documented script mode implementation details in compiler_yaml_helpers.go:
    • Checkout step uses sparse checkout from githubnext/gh-aw to /tmp/gh-aw/actions-source
    • Setup step executes bash /tmp/gh-aw/actions-source/actions/setup/setup.sh instead of uses: ./actions/setup
  • Added comparative examples showing dev vs. script mode YAML output

Example

---
name: Debug Workflow
on: workflow_dispatch
features:
  action-mode: "script"
permissions:
  contents: read
---

Generates:

- name: Checkout actions folder
  uses: actions/checkout@v5
  with:
    repository: githubnext/gh-aw
    sparse-checkout: |
      actions
    path: /tmp/gh-aw/actions-source
    depth: 1
    
- name: Setup Scripts
  run: |
    bash /tmp/gh-aw/actions-source/actions/setup/setup.sh
  env:
    INPUT_DESTINATION: /opt/gh-aw/actions
Original prompt

Document the frontMtter field “features.action-mode: script” were the compiler generates a call to a shell script to install the custom action script.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Document frontMatter field for action mode script Document features.action-mode: script frontmatter field Jan 22, 2026
Copilot AI requested a review from pelikhan January 22, 2026 16:50
@pelikhan pelikhan marked this pull request as ready for review January 22, 2026 16:58
@pelikhan pelikhan merged commit a9eeffa into main Jan 22, 2026
@pelikhan pelikhan deleted the copilot/document-action-mode-script branch January 22, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants