Created
February 11, 2025 08:03
-
-
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.
This file contains hidden or 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
# 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