Skip to content

Commit

Permalink
Refactor build-dev-container.yaml to remove trailing slashes and lead…
Browse files Browse the repository at this point in the history
…ing 'templates/' from folder names

- Remove trailing slashes from folder names
- Remove leading 'templates/' from folder names
  • Loading branch information
npv2k1 committed Feb 2, 2024
1 parent f904115 commit ee60e81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-dev-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
id: set-matrix
run: |
FOLDERS=$(ls -d templates/*/)
FOLDERS=${FOLDERS//\//} # remove trailing slashes
FOLDERS=${FOLDERS%/} # remove trailing slashes
FOLDERS=${FOLDERS//templates\//} # remove leading 'templates/'
FOLDERS_JSON=$(echo "$FOLDERS" | jq -R -s -c 'split("\n")[:-1]')
echo "FOLDERS_JSON: $FOLDERS_JSON"
echo "::set-output name=matrix::${FOLDERS_JSON}"
build:
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit ee60e81

Please sign in to comment.