|
71 | 71 | prNumber: ${{ steps.PR.outputs.number }} |
72 | 72 | prUrl: ${{ steps.PR.outputs.pr_url }} |
73 | 73 |
|
| 74 | + - name: Get latest mathlib-ci SHA |
| 75 | + if: ${{ !contains(steps.PR.outputs.pr_labels, 'ready-to-merge') }} |
| 76 | + id: mathlib-ci-sha |
| 77 | + env: |
| 78 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 79 | + run: | |
| 80 | + SHA=$(gh api repos/leanprover-community/mathlib-ci/commits/HEAD --jq '.sha') |
| 81 | + echo "sha=$SHA" >> "$GITHUB_OUTPUT" |
| 82 | +
|
| 83 | + - name: Update mathlib-ci ref in get-mathlib-ci action |
| 84 | + if: ${{ !contains(steps.PR.outputs.pr_labels, 'ready-to-merge') }} |
| 85 | + id: update-mathlib-ci-ref |
| 86 | + run: | |
| 87 | + sed -i "s|^\( *default: \)[0-9a-f]\{40\}|\1${{ steps.mathlib-ci-sha.outputs.sha }}|" \ |
| 88 | + .github/actions/get-mathlib-ci/action.yml |
| 89 | + if git diff --quiet .github/actions/get-mathlib-ci/action.yml; then |
| 90 | + echo "modified=false" >> "$GITHUB_OUTPUT" |
| 91 | + else |
| 92 | + echo "modified=true" >> "$GITHUB_OUTPUT" |
| 93 | + fi |
| 94 | +
|
74 | 95 | - name: Update dependencies |
75 | 96 | if: ${{ !contains(steps.PR.outputs.pr_labels, 'ready-to-merge') }} |
76 | 97 | run: lake update -v |
@@ -116,6 +137,10 @@ jobs: |
116 | 137 | create_pr=true |
117 | 138 | echo "Differences found with lake-manifest.json on $BRANCH_NAME, need to run create-pull-request to update $BRANCH_NAME" |
118 | 139 | fi |
| 140 | + if [ "${{ steps.update-mathlib-ci-ref.outputs.modified }}" == "true" ]; then |
| 141 | + create_pr=true |
| 142 | + echo "mathlib-ci ref was updated, need to run create-pull-request" |
| 143 | + fi |
119 | 144 | # Otherwise, there's no reason to run create-pull-request |
120 | 145 | echo "create_pr=$create_pr" >> "${GITHUB_OUTPUT}" |
121 | 146 |
|
|
0 commit comments