-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.87 KB
/
upstream-sync.yml
File metadata and controls
53 lines (46 loc) · 1.87 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
47
48
49
50
51
52
53
name: Upstream Sync Check
on:
schedule:
- cron: '0 9 * * 1' # Weekly Monday 9am UTC
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
check-upstream:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: Check for sdlc-wizard updates
env:
GH_TOKEN: ${{ github.token }}
run: |
LATEST=$(gh release view --repo BaseInfinity/agentic-ai-sdlc-wizard --json tagName -q .tagName 2>/dev/null || echo "unknown")
CURRENT=$(cat UPSTREAM_VERSION 2>/dev/null || echo "none")
if [ "$LATEST" = "unknown" ]; then
echo "Could not fetch upstream version"
exit 0
fi
if [ "$LATEST" != "$CURRENT" ]; then
# Check if issue already exists
EXISTING=$(gh issue list --search "Upstream sync: $LATEST" --json number -q '.[0].number' 2>/dev/null || echo "")
if [ -z "$EXISTING" ]; then
LABEL_ARGS=()
if gh label view upstream-sync >/dev/null 2>&1; then
LABEL_ARGS=(--label "upstream-sync")
else
echo "Optional label 'upstream-sync' not found; creating issue without it"
fi
gh issue create \
--title "Upstream sync: sdlc-wizard $LATEST" \
--body "sdlc-wizard released **$LATEST** (adapter is based on **$CURRENT**).
Review [release notes](https://github.com/BaseInfinity/agentic-ai-sdlc-wizard/releases/tag/$LATEST) and translate applicable changes to Codex format.
After adapting, update \`UPSTREAM_VERSION\` to \`$LATEST\`." \
"${LABEL_ARGS[@]}"
echo "Created sync issue for $LATEST"
else
echo "Issue already exists: #$EXISTING"
fi
else
echo "Already up to date: $CURRENT"
fi