-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.36 KB
/
Copy pathcopilot-setup-steps.yml
File metadata and controls
46 lines (39 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Copilot Setup Steps"
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# This job name is required by GitHub Copilot repository agent.
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Detect Ito CLI
run: |
if command -v ito >/dev/null 2>&1; then
echo "ITO_AVAILABLE=1" >> "$GITHUB_ENV"
else
echo "::warning::Ito CLI not found on PATH; skipping Ito audit checks in copilot-setup-steps."
echo "ITO_AVAILABLE=0" >> "$GITHUB_ENV"
fi
- name: Validate Ito audit log
if: env.ITO_AVAILABLE == '1'
run: |
if ! ito audit validate; then
echo "::error::Ito audit validation failed before GitHub Copilot agent startup."
echo "::error::Run 'ito audit validate' for details and 'ito audit reconcile --fix' if drift must be repaired."
exit 1
fi
- name: Check Ito audit drift
if: env.ITO_AVAILABLE == '1'
run: |
if ! ito audit reconcile; then
echo "::warning::Ito audit drift detected. Run 'ito audit reconcile --fix' to write compensating audit events."
fi