From 0a2e46893a79199a822313e5a7da12b58b35cc21 Mon Sep 17 00:00:00 2001 From: leohenon <77656081+lhenon999@users.noreply.github.com> Date: Thu, 21 May 2026 18:09:51 +0800 Subject: [PATCH] ci: report ocv publish failures --- .github/workflows/publish-ocv.yml | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/.github/workflows/publish-ocv.yml b/.github/workflows/publish-ocv.yml index 60dce962a57b..4ab5afa5b5e1 100644 --- a/.github/workflows/publish-ocv.yml +++ b/.github/workflows/publish-ocv.yml @@ -10,6 +10,7 @@ on: permissions: contents: write + issues: write pull-requests: read jobs: @@ -163,6 +164,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Compute checksums id: sum shell: bash @@ -174,6 +176,8 @@ jobs: echo "linux_x64=$(shasum -a 256 "$DIST/ocv-linux-x64.tar.gz" | cut -d ' ' -f 1)" >> "$GITHUB_OUTPUT" - name: Checkout tap + id: checkout_tap + continue-on-error: true uses: actions/checkout@v4 with: repository: leohenon/homebrew-tap @@ -181,6 +185,9 @@ jobs: path: tap - name: Update formula + id: update_formula + if: steps.checkout_tap.outcome == 'success' + continue-on-error: true shell: bash run: | VERSION="${{ inputs.version }}" @@ -226,6 +233,9 @@ jobs: EOF - name: Push formula + id: push_formula + if: steps.checkout_tap.outcome == 'success' && steps.update_formula.outcome == 'success' + continue-on-error: true shell: bash run: | cd tap @@ -237,13 +247,62 @@ jobs: git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" commit -m "Update ocv formula v${{ inputs.version }}" git push + - name: Create Homebrew failure issue + if: steps.checkout_tap.outcome == 'failure' || steps.update_formula.outcome == 'failure' || steps.push_formula.outcome == 'failure' + continue-on-error: true + shell: bash + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + TITLE="Homebrew tap update failed for v${{ inputs.version }}" + BODY_FILE=$(mktemp) + cat > "$BODY_FILE" < "$BODY_FILE" <