Skip to content

Commit

Permalink
Ci no Assets Contract exit properly
Browse files Browse the repository at this point in the history
  • Loading branch information
SudoWeezy committed Jan 14, 2025
1 parent 9615a52 commit eb02a7d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,15 @@ jobs:
# Debug: Check git diff output
echo "Git diff output between $base_branch and $current_branch:"
git diff --name-status "origin/$base_branch" || exit 0
git diff --name-status "origin/$base_branch" > diff_output.txt
# Check if any contract.py file exists in the diff
if ! grep -q '^A\|^R.*assets/[^/]+/smart_contracts/[^/]+/contract\.py$' diff_output.txt; then
echo "No matching 'contract.py' files found in the 'assets' folder. Skipping further processing."
echo "path=" >> $GITHUB_ENV
echo "::set-output name=path::"
exit 0
fi
# Extract added or renamed files matching the pattern
file=$(git diff --name-status "origin/$base_branch" | grep -E '^A|R' | sed -n 's/^[A-Z][0-9]*[[:space:]]\+\([^[:space:]]\+\)$/\1/p' | grep -E '^assets/[^/]+/smart_contracts/[^/]+/contract\.py$' | head -n 1)
Expand Down

0 comments on commit eb02a7d

Please sign in to comment.