Skip to content

Commit

Permalink
Refactor build-dev-container.yaml to list directories in templates fo…
Browse files Browse the repository at this point in the history
…lder
  • Loading branch information
npv2k1 committed Feb 2, 2024
1 parent d3c9e5f commit dfe0b2b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-dev-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ jobs:
outputs:
dir: ${{ steps.list-dir.outputs.dir }}
steps:
- name: List Dir
id: list-dir
uses: pnstack/actions/list-dir@main
# with:
# dir: templates
- id: "list-dir"
shell: python
run: |
import os
import json
dir = "templates"
dirs = [name for name in os.listdir(dir) if os.path.isdir(os.path.join(dir, name))]
print(f"::set-output name=dir::{json.dumps(dirs)}")
- name: log
run: echo ${{ steps.list-dir.outputs.dir }}

Expand Down

0 comments on commit dfe0b2b

Please sign in to comment.