|
18 | 18 | update: |
19 | 19 | name: Autoupdate dependencies |
20 | 20 | runs-on: ubuntu-latest |
21 | | - timeout-minutes: 30 |
| 21 | + timeout-minutes: 60 |
22 | 22 | env: |
23 | 23 | SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }} |
24 | 24 | GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/serviceAccount.json |
@@ -128,14 +128,6 @@ jobs: |
128 | 128 | --assignee siarheidudko \ |
129 | 129 | --reviewer siarheidudko) |
130 | 130 | echo "pr_url=$PR_URL" >> "$GITHUB_OUTPUT" |
131 | | - - name: Enable auto-merge on success PR |
132 | | - if: steps.pr_success.outputs.pr_url != '' |
133 | | - env: |
134 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
135 | | - PR_URL: ${{ steps.pr_success.outputs.pr_url }} |
136 | | - run: | |
137 | | - gh api repos/${{ github.repository }} --method PATCH -f allow_auto_merge=true || true |
138 | | - gh pr merge "$PR_URL" --auto --squash || true |
139 | 131 | - name: Open PR (autoupdater failed) |
140 | 132 | id: pr_failure |
141 | 133 | if: steps.autoupdate.outcome == 'failure' && steps.diff.outputs.has_diff == 'true' |
@@ -172,6 +164,31 @@ jobs: |
172 | 164 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
173 | 165 | run: | |
174 | 166 | gh workflow run pr-checks.yml --ref "$AUTOUPDATE_BRANCH" || true |
| 167 | + - name: Wait for PR checks and merge (autoupdater succeeded) |
| 168 | + id: merge_pr |
| 169 | + if: steps.pr_success.outputs.pr_url != '' |
| 170 | + continue-on-error: true |
| 171 | + env: |
| 172 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 173 | + PR_URL: ${{ steps.pr_success.outputs.pr_url }} |
| 174 | + run: | |
| 175 | + for i in $(seq 1 10); do |
| 176 | + COUNT=$(gh pr checks "$PR_URL" 2>/dev/null | grep -c '\S' || true) |
| 177 | + [ "$COUNT" -gt 0 ] && break |
| 178 | + sleep 30 |
| 179 | + done |
| 180 | + gh pr checks "$PR_URL" --watch |
| 181 | + gh pr merge "$PR_URL" --squash --delete-branch |
| 182 | + - name: Tag release commit and dispatch deploy |
| 183 | + if: steps.merge_pr.outcome == 'success' && steps.pkg.outputs.version != '' |
| 184 | + env: |
| 185 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 186 | + run: | |
| 187 | + git fetch origin main |
| 188 | + git tag -f "v${{ steps.pkg.outputs.version }}" "$(git rev-parse origin/main)" |
| 189 | + git push --force origin "v${{ steps.pkg.outputs.version }}" |
| 190 | + gh workflow run build-and-deploy.yml --ref main \ |
| 191 | + -f tag="v${{ steps.pkg.outputs.version }}" || true |
175 | 192 | - name: Dispatch Claude to fix the failed autoupdate |
176 | 193 | if: steps.pr_failure.outputs.pr_url != '' |
177 | 194 | env: |
|
0 commit comments