Skip to content

Commit

Permalink
Check for toml updates only
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Jul 1, 2024
1 parent 3cb28fb commit 28b522d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/update-cow-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ jobs:
run: |
sed -i '/git = "https:\/\/github.com\/cowprotocol\/services.git"/!b; s/tag = "[^"]*"/tag = "${{ env.TAG }}"/g' ./Cargo.toml
- name: Check for changes
run: |
git diff --exit-code || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
- name: No changes detected
if: env.CHANGES_DETECTED != 'true'
run: echo "No updates necessary. Dependencies are already up-to-date."

- name: Identify and update specific CoW dependencies in Cargo.lock
if: env.CHANGES_DETECTED != 'true'
run: |
PACKAGES=$(grep -oP 'package = "\K[^"]*' <(grep -B1 'git = "https:\/\/github.com\/cowprotocol\/services.git"' Cargo.toml))
echo "Identified packages: $PACKAGES"
Expand All @@ -40,14 +49,6 @@ jobs:
cargo update -p $package
done
- name: Check for changes
run: |
git diff --exit-code || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
- name: No changes detected
if: env.CHANGES_DETECTED != 'true'
run: echo "No updates necessary. Dependencies are already up-to-date."

- name: Commit changes
if: env.CHANGES_DETECTED == 'true'
id: commit
Expand Down

0 comments on commit 28b522d

Please sign in to comment.