|
21 | 21 | permissions: |
22 | 22 | contents: write |
23 | 23 | pull-requests: write |
24 | | - issues: write |
25 | 24 | timeout-minutes: 30 |
26 | 25 | if: ${{ !github.event.release.prerelease }} |
27 | 26 |
|
@@ -129,42 +128,3 @@ jobs: |
129 | 128 | --base "$BRANCH" \ |
130 | 129 | --title "Sync JNI branch with release $TAG" \ |
131 | 130 | --body-file /tmp/pr-body.md |
132 | | -
|
133 | | - - name: Create issue on failure |
134 | | - if: steps.merge.outcome == 'failure' || steps.regenerate.outcome == 'failure' |
135 | | - env: |
136 | | - GH_TOKEN: ${{ steps.token.outputs.token }} |
137 | | - TAG: ${{ steps.release.outputs.tag }} |
138 | | - BRANCH: ${{ env.JNI_BRANCH }} |
139 | | - RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
140 | | - MERGE_OUTCOME: ${{ steps.merge.outcome }} |
141 | | - run: | |
142 | | - if [ "$MERGE_OUTCOME" = "failure" ]; then |
143 | | - FAILED_STEP="Merge release tag" |
144 | | - else |
145 | | - FAILED_STEP="Regenerate JNI bindings" |
146 | | - fi |
147 | | - LOG_TAIL="$(tail -100 /tmp/jni-regen.log 2>/dev/null || echo 'No log output available')" |
148 | | - { |
149 | | - echo "## JNI Branch Sync Failure" |
150 | | - echo "The automated sync of the JNI compatibility branch failed for release \`$TAG\`." |
151 | | - echo "" |
152 | | - echo "**Failed step:** $FAILED_STEP" |
153 | | - echo "**Workflow run:** $RUN_URL" |
154 | | - echo "**Target branch:** \`$BRANCH\`" |
155 | | - echo "" |
156 | | - echo "## Error Logs (last 100 lines)" |
157 | | - echo '```' |
158 | | - echo "$LOG_TAIL" |
159 | | - echo '```' |
160 | | - echo "" |
161 | | - echo "## Manual Remediation" |
162 | | - echo "1. Checkout the JNI branch: \`git checkout $BRANCH\`" |
163 | | - echo "2. Merge the release tag: \`git merge $TAG\`" |
164 | | - echo "3. Run: \`cd packages/flutter && scripts/safe-regenerate-jni.sh\`" |
165 | | - echo "4. Resolve any issues manually" |
166 | | - echo "5. Commit and push the changes" |
167 | | - } > /tmp/issue-body.md |
168 | | - gh issue create \ |
169 | | - --title "JNI branch sync failed for release $TAG" \ |
170 | | - --body-file /tmp/issue-body.md |
0 commit comments