Make genesis creation commands era-sensitive #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |