Skip to content

Commit 11ebdd5

Browse files
committed
chore: cleanup workflows
1 parent 4418457 commit 11ebdd5

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/push-to-nightly.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ jobs:
1818
fetch-depth: 0
1919
token: ${{ secrets.UNICODE_BASIC_TOKEN }}
2020

21-
- name: set user
21+
- name: merge main
2222
run: |
2323
git config user.name "${{ github.actor }}"
2424
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
25-
26-
- name: merge main
27-
run: |
2825
git merge origin/main --no-commit --strategy-option ours --allow-unrelated-histories
2926
git restore --staged lean-toolchain lake-manifest.json
30-
git commit -m "chore: merge main into nightly-testing"
27+
git commit --allow-empty -m "chore: merge main into nightly-testing"
3128
git push origin nightly-testing

.github/workflows/update-nightly-toolchain.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,18 @@ jobs:
2424
git config user.name "${{ github.actor }}"
2525
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
2626
27-
- name: update lean-toolchain
27+
- name: get toochain tags
2828
id: toolchain-tag
2929
run: |
3030
LEAN_TAG=$(curl -s "https://api.github.com/repos/leanprover/lean4-nightly/releases" | jq -r '.[0].tag_name')
31+
REPO_TAG=$(cut -d ':' -f2 lean-toolchain | tr -d '\n')
3132
echo "lean_tag=$LEAN_TAG" >> $GITHUB_OUTPUT
32-
echo "leanprover/lean4:$LEAN_TAG" > lean-toolchain
33-
git add lean-toolchain
33+
echo "repo_tag=$REPO_TAG" >> $GITHUB_OUTPUT
3434
3535
- name: commit and push
36+
if: ${{ steps.toolchain-tag.outputs.lean_tag != steps.toolchain-tag.outputs.repo_tag }}
3637
run: |
38+
echo "leanprover/lean4:${{ steps.toolchain-tag.outputs.lean_tag }}" > lean-toolchain
39+
git add lean-toolchain
3740
git commit -m "chore: update toolchain ${{ steps.toolchain-tag.outputs.lean_tag }}"
3841
git push origin nightly-testing

.github/workflows/update-toolchain.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
echo "leanprover/lean4:${{ steps.toolchain-tag.outputs.lean_tag }}" > lean-toolchain
3838
3939
- name: create pull request
40+
if: ${{ steps.toolchain-tag.outputs.lean_tag != steps.toolchain-tag.outputs.repo_tag }}
4041
uses: peter-evans/create-pull-request@v8
4142
with:
4243
token: ${{ secrets.UNICODE_BASIC_TOKEN }}

0 commit comments

Comments
 (0)