Skip to content

Commit 2c06cde

Browse files
committed
fix: check for changes
1 parent 6ef342a commit 2c06cde

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/update-versions.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Update Lotus Version
22

33
on:
4-
workflow_dispatch: # Allows manual trigger
4+
workflow_dispatch:
55
pull_request:
6-
types: [opened, reopened]
6+
types: [opened, reopened, synchronize]
77

88
jobs:
99
update-version:
@@ -24,7 +24,7 @@ jobs:
2424
2525
# Extract the tag name
2626
TAG_NAME=$(echo "$RELEASE_INFO" | jq -r .tag_name)
27-
27+
2828
# Extract version number (remove 'v' prefix)
2929
LATEST_VERSION=$(echo $TAG_NAME | sed 's/^v//')
3030
@@ -34,8 +34,14 @@ jobs:
3434
- name: Run update script
3535
run: |
3636
node update-versions.js ${{ env.LATEST_VERSION }}
37+
38+
- name: Check for changes
39+
id: git-check
40+
run: |
41+
git diff --exit-code || echo "CHANGES=true" >> $GITHUB_ENV
3742
3843
- name: Create Pull Request
44+
if: env.CHANGES == 'true'
3945
uses: peter-evans/create-pull-request@v5
4046
with:
4147
commit-message: 'Chore: update Lotus version references to ${{ env.LATEST_VERSION }}'

0 commit comments

Comments
 (0)