Skip to content

Commit

Permalink
Make workflow files pass actionlint
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed May 15, 2024
1 parent af83de4 commit c6e0895
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-cabal-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Workaround runner image issue
if: runner.os == 'Linux'
# https://github.com/actions/runner-images/issues/7061
run: sudo chown -R $USER /usr/local/.ghcup
run: sudo chown -R "$USER" /usr/local/.ghcup

- name: Install Haskell
uses: input-output-hk/setup-haskell@v1
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/check-stylish-haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@ jobs:
steps:
- name: Download stylish-haskell
if: runner.os == 'Linux'
run: |
version="${{ env.STYLISH_HASKELL_VERSION }}"
curl -sL \
"https://github.com/haskell/stylish-haskell/releases/download/v$version/stylish-haskell-v$version-linux-x86_64.tar.gz" \
| tar -C "/tmp" -xz
echo "PATH=/tmp/stylish-haskell-v$version-linux-x86_64:$PATH" >> $GITHUB_ENV
echo "PATH=/tmp/stylish-haskell-v$version-linux-x86_64:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v3

Expand All @@ -55,10 +54,10 @@ jobs:
for x in $(git ls-tree --full-tree --name-only -r HEAD ${{ env.STYLISH_HASKELL_PATHS }}); do
if [ "${x##*.}" == "hs" ]; then
if grep -qE '^#' $x; then
if grep -qE '^#' "$x"; then
echo "$x contains CPP. Skipping."
else
stylish-haskell -i $x
stylish-haskell -i "$x"
fi
fi
done
Expand All @@ -72,10 +71,10 @@ jobs:
git fetch origin ${{ github.base_ref }} --unshallow
for x in $(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}..HEAD ${{ env.STYLISH_HASKELL_PATHS }}); do
if [ "${x##*.}" == "hs" ]; then
if grep -qE '^#' $x; then
if grep -qE '^#' "$x"; then
echo "$x contains CPP. Skipping."
else
stylish-haskell -i $x
stylish-haskell -i "$x"
fi
fi
done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
- name: Create Release Tag
id: create_release_tag
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
- name: Create Release
id: create_release
Expand Down

0 comments on commit c6e0895

Please sign in to comment.