Skip to content

Commit d476b56

Browse files
committed
Add imports
1 parent d87fd59 commit d476b56

6 files changed

Lines changed: 448 additions & 0 deletions

File tree

File renamed without changes.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
# Daily Audit Base - Standard stack for daily audit workflows publishing to GitHub Discussions.
3+
# Bundles: daily-audit-discussion + reporting guidelines + OTLP observability.
4+
#
5+
# Usage:
6+
# imports:
7+
# - uses: shared/daily-audit-base.md
8+
# with:
9+
# title-prefix: "[my-workflow] "
10+
# expires: "1d" # optional, default: 3d
11+
12+
import-schema:
13+
title-prefix:
14+
type: string
15+
required: true
16+
description: "Title prefix for created discussions, e.g. '[daily-report] '"
17+
expires:
18+
type: string
19+
default: "3d"
20+
description: "How long to keep discussions before expiry"
21+
22+
imports:
23+
- uses: shared/daily-audit-discussion.md
24+
with:
25+
title-prefix: "${{ github.aw.import-inputs.title-prefix }}"
26+
expires: "${{ github.aw.import-inputs.expires }}"
27+
- shared/reporting.md
28+
- shared/observability-otlp.md
29+
---
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
# gh-aw Extension - Shared Component
3+
# Installs the gh-aw CLI extension and copies the binary
4+
# for MCP server containerization.
5+
#
6+
# This component replaces the compiler-generated "Install gh-aw extension"
7+
# step with a robust installation that handles pre-installed binaries
8+
# (e.g., from copilot-setup-steps.yml curl-based installs).
9+
#
10+
# Usage:
11+
# imports:
12+
# - uses: shared/mcp/gh-aw.md
13+
14+
steps:
15+
- name: Install gh-aw extension
16+
env:
17+
GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
18+
run: |
19+
# Install gh-aw if not already available
20+
if ! gh aw --version >/dev/null 2>&1; then
21+
echo "Installing gh-aw extension..."
22+
curl -fsSL https://raw.githubusercontent.com/github/gh-aw/refs/heads/main/install-gh-aw.sh | bash
23+
fi
24+
gh aw --version
25+
# Copy the gh-aw binary to ${RUNNER_TEMP}/gh-aw for MCP server containerization
26+
mkdir -p "${RUNNER_TEMP}/gh-aw"
27+
GH_AW_BIN=""
28+
GH_AW_BIN=$(command -v gh-aw 2>/dev/null) || true
29+
if [ -z "$GH_AW_BIN" ]; then
30+
GH_AW_BIN=$(find "${HOME}/.local/share/gh/extensions/gh-aw" -name 'gh-aw' -type f 2>/dev/null | head -1) || true
31+
fi
32+
if [ -n "$GH_AW_BIN" ] && [ -f "$GH_AW_BIN" ]; then
33+
cp "$GH_AW_BIN" "${RUNNER_TEMP}/gh-aw/gh-aw"
34+
chmod +x "${RUNNER_TEMP}/gh-aw/gh-aw"
35+
echo "Copied gh-aw binary to ${RUNNER_TEMP}/gh-aw/gh-aw"
36+
else
37+
echo "::error::Failed to find gh-aw binary for MCP server"
38+
exit 1
39+
fi
40+
---

0 commit comments

Comments
 (0)