Skip to content

Commit d3751ce

Browse files
committed
cicd tag
1 parent 446ae03 commit d3751ce

1 file changed

Lines changed: 110 additions & 0 deletions

File tree

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
phase: quick
3+
plan: 260317-l9s
4+
type: execute
5+
wave: 1
6+
depends_on: []
7+
files_modified: [.github/workflows/ci-deploy.yml]
8+
autonomous: true
9+
requirements: [QUICK-CI-TAG-ONLY]
10+
11+
must_haves:
12+
truths:
13+
- "CI/CD workflow triggers ONLY on push of a tag matching v*"
14+
- "Push to main or develop does NOT trigger any workflow run"
15+
- "Pull requests do NOT trigger any workflow run"
16+
- "All deploy/build jobs still run correctly when triggered by a tag push"
17+
artifacts:
18+
- path: ".github/workflows/ci-deploy.yml"
19+
provides: "CI/CD workflow with tag-only trigger"
20+
contains: "tags:"
21+
key_links:
22+
- from: ".github/workflows/ci-deploy.yml"
23+
to: "GitHub Actions"
24+
via: "on.push.tags trigger"
25+
pattern: "on:\\s+push:\\s+tags:"
26+
---
27+
28+
<objective>
29+
Restrict CI/CD workflow to trigger ONLY on tag pushes (e.g., `v3.3`), removing triggers for branch pushes (main/develop) and pull requests.
30+
31+
Purpose: Avoid unnecessary CI/CD runs on every push to main/develop. Deployments should only happen when a version tag is pushed.
32+
Output: Updated `.github/workflows/ci-deploy.yml` with tag-only trigger and simplified job conditions.
33+
</objective>
34+
35+
<execution_context>
36+
@/home/toto/.claude/get-shit-done/workflows/execute-plan.md
37+
@/home/toto/.claude/get-shit-done/templates/summary.md
38+
</execution_context>
39+
40+
<context>
41+
@.github/workflows/ci-deploy.yml
42+
</context>
43+
44+
<tasks>
45+
46+
<task type="auto">
47+
<name>Task 1: Restrict workflow trigger to tag push only and simplify job conditions</name>
48+
<files>.github/workflows/ci-deploy.yml</files>
49+
<action>
50+
1. Change the `on:` trigger block from:
51+
```yaml
52+
on:
53+
push:
54+
branches: [main, develop]
55+
tags:
56+
- 'v*'
57+
pull_request:
58+
branches: [main, develop]
59+
```
60+
to:
61+
```yaml
62+
on:
63+
push:
64+
tags:
65+
- 'v*'
66+
```
67+
68+
2. Simplify all job `if` conditions. Since the workflow now ONLY triggers on tag pushes, the `github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')` checks are redundant. Update each job:
69+
70+
- `build-apk` (line 50): Change from `if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.event_name == 'push' && needs.lint-and-typecheck.result == 'success'` to `if: needs.lint-and-typecheck.result == 'success'` (event_name is always 'push' and ref is always a tag now)
71+
72+
- `create-release` (line 135): Change from `if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.event_name == 'push' && needs.build-apk.result == 'success'` to `if: needs.build-apk.result == 'success'`
73+
74+
- `deploy-landing` (line 167): Change from `if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.event_name == 'push' && needs.lint-and-typecheck.result == 'success'` to `if: needs.lint-and-typecheck.result == 'success'`
75+
76+
- `deploy-deck-builder` (line 208): Same simplification as deploy-landing — change to `if: needs.lint-and-typecheck.result == 'success'`
77+
78+
- `deploy-migrations` (line 271): Same simplification — change to `if: needs.lint-and-typecheck.result == 'success'`
79+
80+
- `deploy-functions` (line 312): Same simplification — change to `if: needs.lint-and-typecheck.result == 'success'`
81+
82+
3. Update stale comments:
83+
- Line 17: Change `# CI Jobs - Run on all pushes and PRs` to `# CI Jobs - Run on tag push`
84+
- Line 161: Change `# Deploy Jobs - Only on push to main` to `# Deploy Jobs - Run on tag push`
85+
86+
Do NOT change anything else — keep all job steps, secrets, env vars, and artifacts exactly as they are.
87+
</action>
88+
<verify>
89+
<automated>cd /home/toto/scm-projects/lumio && grep -c 'branches:' .github/workflows/ci-deploy.yml | grep '^0$' && grep -c 'pull_request:' .github/workflows/ci-deploy.yml | grep '^0$' && grep "tags:" .github/workflows/ci-deploy.yml && echo "PASS: trigger is tag-only"</automated>
90+
</verify>
91+
<done>Workflow triggers only on tag push. No branch push or PR triggers remain. All job `if` conditions simplified to only check dependency results. Stale comments updated.</done>
92+
</task>
93+
94+
</tasks>
95+
96+
<verification>
97+
- `grep -c 'branches:' .github/workflows/ci-deploy.yml` returns 0
98+
- `grep -c 'pull_request:' .github/workflows/ci-deploy.yml` returns 0
99+
- `grep 'tags:' .github/workflows/ci-deploy.yml` shows the v* tag filter
100+
- No job has `github.ref == 'refs/heads/main'` in its condition
101+
- YAML is valid (no syntax errors)
102+
</verification>
103+
104+
<success_criteria>
105+
The CI/CD workflow file triggers exclusively on tag pushes matching `v*`. No workflow runs occur on pushes to main/develop or on pull requests. All deploy jobs retain their correct dependency chains and run successfully when a tag is pushed.
106+
</success_criteria>
107+
108+
<output>
109+
After completion, create `.planning/quick/260317-l9s-ci-cd-trigger-solo-su-push-tag/260317-l9s-SUMMARY.md`
110+
</output>

0 commit comments

Comments
 (0)