mirror of
https://github.com/tiennm99/cheahjs-free-llm-api-resources.git
synced 2026-10-17 04:14:40 +00:00
refactor: Use output instead of exit code to check for diffs in update-readme workflow
This commit is contained in:
1 parent
774955fe05
commit
ab4dd70164
1 file changed
+4
-3
@@ -31,15 +31,16 @@ jobs:
|
||||
- name: Check for changes
|
||||
id: changes
|
||||
run: |
|
||||
git diff --exit-code
|
||||
git diff > changes.diff
|
||||
echo "diff=$(cat changes.diff)" >> $GITHUB_OUTPUT
|
||||
- name: Commit changes
|
||||
if: steps.changes.outputs.exit_code != '0'
|
||||
if: steps.changes.outputs.diff != ''
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Update README with latest models"
|
||||
branch: update-readme-${{ github.run_id }}
|
||||
- name: Create Pull Request
|
||||
if: steps.changes.outputs.exit_code != '0'
|
||||
if: steps.changes.outputs.diff != ''
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
title: "Update README with latest models"
|
||||
|
||||
Reference in new issue
Block a user