Skip to content

Commit

Permalink
Use multiline script in yaml
Browse files Browse the repository at this point in the history
Co-authored-by: Max Fischer <[email protected]>
  • Loading branch information
giffels and maxfischer2781 committed Sep 1, 2021
1 parent 66940b5 commit 078c750
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ jobs:
- uses: actions/checkout@v2
- name: Get containers to build
id: get_containers
run: python3 -c 'import json; import os; os.chdir("containers"); print("::set-output name=containers::%s" % json.dumps([os.path.normpath(dirpath) for dirpath, dirnames, filenames in os.walk(".") if "Dockerfile" in filenames]))'
run: |
python3 -c '
import json
import pathlib
os.chdir("containers")
print(
"::set-output name=containers::%s"
% json.dumps([
str(path.parent.relative_to("containers"))
for path in pathlib.Path("containers").glob("**/Dockerfile")
]
))
'
outputs:
containers: ${{ steps.get_containers.outputs.containers }}

Expand Down

0 comments on commit 078c750

Please sign in to comment.