chore: remove temporary macOS CI annotation cleanup workflow

This commit is contained in:
Syngnat
2026-07-08 09:38:54 +08:00
parent e7b63f7779
commit 38f869c10d

View File

@@ -1,67 +0,0 @@
name: Apply macOS CI annotation cleanup
on:
push:
branches:
- fix/ci-quiet-macos-annotations
paths:
- .github/workflows/apply-ci-quiet-macos-annotations.yml
permissions:
contents: write
jobs:
apply:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
ref: fix/ci-quiet-macos-annotations
persist-credentials: true
- name: Patch workflow files
shell: bash
run: |
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
def patch_file(path: str) -> None:
p = Path(path)
text = p.read_text()
text = text.replace('os: macos-latest', 'os: macos-15')
quiet = ''' - name: Quiet Homebrew runner taps
if: startsWith(matrix.platform, 'darwin/')
shell: bash
run: |
brew untap aws/tap >/dev/null 2>&1 || true
'''
if 'Quiet Homebrew runner taps' not in text:
job_anchor = ' runs-on: ${{ matrix.os }}\n strategy:'
anchor_index = text.find(job_anchor)
if anchor_index < 0:
raise SystemExit(f'build job anchor not found in {path}')
marker = ' - name: Checkout code\n uses: actions/checkout@v5\n\n'
marker_index = text.find(marker, anchor_index)
if marker_index < 0:
raise SystemExit(f'build checkout marker not found in {path}')
insert_at = marker_index + len(marker)
text = text[:insert_at] + quiet + text[insert_at:]
p.write_text(text)
patch_file('.github/workflows/dev-build.yml')
patch_file('.github/workflows/release.yml')
workflow = Path('.github/workflows/apply-ci-quiet-macos-annotations.yml')
if workflow.exists():
workflow.unlink()
PY
git diff --check
- name: Commit patch
shell: bash
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .github/workflows/dev-build.yml .github/workflows/release.yml .github/workflows/apply-ci-quiet-macos-annotations.yml
git commit -m "ci: quiet macOS workflow annotations"
git push origin HEAD:fix/ci-quiet-macos-annotations