Skip to content

Instantly share code, notes, and snippets.

@boltronics
Created February 11, 2025 08:03
Show Gist options
  • Save boltronics/073af105dcb1d3d862cfc34ade013412 to your computer and use it in GitHub Desktop.
Save boltronics/073af105dcb1d3d862cfc34ade013412 to your computer and use it in GitHub Desktop.
A GitHub Action job step to print files in each directory in the PATH. May be useful for debugging.
# Partial GitHub Actions workflow file.
# Place under .github/workflows/ of your project's root directory.
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
# - steps
- name: What commands are available in my PATH?
run: |
IFS=":"
for i in $PATH
do
echo "=== ${i} ==="
if [ -d "${i}" ]
then
find "${i}" -mindepth 1 -maxdepth 1
else
echo "N/A"
fi
echo
done
shell: bash
# - more steps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment