Skip to content

Commit 6e8375b

Browse files
JOYclaude
andcommitted
fix(ci): remove upstream-only workflows after sync-upstream merge
The sync-upstream workflow merges from blockscout/blockscout, which re-introduces all chain-specific release/publish workflows we deleted. Those workflows then trigger on release events, causing notification spam. Added a cleanup step that removes all workflow files except our 3 DOS-specific ones (deploy-config, publish-regular, sync-upstream) after each upstream merge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f6d2e22 commit 6e8375b

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/sync-upstream.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,37 @@ jobs:
134134
135135
echo "result=success" >> $GITHUB_OUTPUT
136136
137+
- name: Remove upstream-only workflows
138+
if: steps.target.outputs.skip == 'false' && steps.merge.outputs.result == 'success'
139+
run: |
140+
# Keep ONLY our DOS-specific workflows, delete everything else
141+
KEEP_FILES=(
142+
"deploy-config.yml"
143+
"publish-regular-docker-image-on-demand.yml"
144+
"sync-upstream.yml"
145+
)
146+
147+
cd .github/workflows/
148+
for f in *.yml; do
149+
KEEP=false
150+
for keep in "${KEEP_FILES[@]}"; do
151+
if [ "$f" = "$keep" ]; then
152+
KEEP=true
153+
break
154+
fi
155+
done
156+
if [ "$KEEP" = false ]; then
157+
echo " Removing upstream workflow: $f"
158+
rm "$f"
159+
fi
160+
done
161+
cd ../..
162+
163+
if git diff --name-only | grep -q '\.github/workflows/'; then
164+
git add .github/workflows/
165+
git commit -m "chore: remove upstream-only workflows after sync"
166+
fi
167+
137168
- name: Push and tag
138169
if: steps.target.outputs.skip == 'false' && steps.merge.outputs.result == 'success'
139170
run: |

0 commit comments

Comments
 (0)