Skip to content

Commit

Permalink
only update on changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepistrol committed May 17, 2024
1 parent 7ad00e3 commit 960dafd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/update-swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,20 @@ jobs:
checksum=${{ steps.fetch_details.outputs.checksum }}
sed -i 's|url: "https://github.com/realm/SwiftLint/releases/download/.*"|url: "'"${binary_url}"'"|' Package.swift
sed -i 's|checksum: ".*"|checksum: "'"${checksum}"'"|' Package.swift
- name: Commit changes
- name: Check for changes
id: check_changes
run: |
if git diff --quiet; then
echo "No changes detected"
echo "::set-output name=changes_detected::false"
else
echo "Changes detected"
echo "::set-output name=changes_detected::true"
fi
- name: Commit and push changes
if: steps.check_changes.outputs.changes_detected == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
Expand Down

0 comments on commit 960dafd

Please sign in to comment.