Skip to content

Added a new query for a snapshot of big ledger peers #65

Added a new query for a snapshot of big ledger peers

Added a new query for a snapshot of big ledger peers #65

name: Check cabal-gild format
on:
merge_group:
pull_request:
jobs:
check-cabal-gild:
runs-on: ubuntu-latest
env:
CARDANO_GUILD_VERSION: "1.3.1.2"
steps:
- name: Download cardano-gild
run: |
cardano_gild_path="$(mktemp -d)"
version="${{env.CARDANO_GUILD_VERSION}}"
curl -sL \
"https://github.com/tfausak/cabal-gild/releases/download/$version/cabal-gild-$version-linux-x64.tar.gz" \
| tar -C "$cardano_gild_path" -xz
echo "PATH=$cardano_gild_path:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Run cardano-gild over all modified files
run: |
rc="0"
for file in $(git ls-files "*.cabal")
do
echo "cabal-gild --mode=check --input=$file"
if ! cabal-gild --mode=check --input="$file"
then
echo "💣 $file is badly formatted. Fix it with:"
echo "cabal-gild --mode=format --io=$file"
rc="1"
fi
done
exit $rc