This small and simple plugin lists all files of a directory and returns the output as json. This json can be later used for a dynamic build matrix.
Optional The directory to look for the files. Default "project root"
.
Optional File extension filter. (e.g., "txt","yml")
Optional List of values for which starts with are only used. (e.g., "dev_,test,config-")
Optional Delimiter for the only list. (Default: ",")
Optional List of values for which files should be ignored. (e.g., "ignore_,test,config-")
Optional Delimiter for the ignore list. (Default: ",")
The list of files including file extension as json
The list of files names without file extension as json
uses: the-coding-turtle/[email protected]
Or with optional parameters:
uses: the-coding-turtle/[email protected]
with:
directory: "configs"
file_extension: "yml"
ignore_files_starts_with: "ignore_;test;config-"
ignore_files_starts_with_delimiter: ";"
name: Multi Tenant GAE Deploy
on:
push:
workflow_dispatch:
jobs:
lookup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.filelist.outputs.file_names }}
steps:
- uses: actions/checkout@v2
- name: Get all yaml files
id: filelist
uses: the-coding-turtle/[email protected]
with:
directory: "gae_yaml"
file_extension: "yaml"
multi_tenant:
needs: lookup
runs-on: ubuntu-latest
strategy:
matrix:
tenant: ${{fromJson(needs.lookup.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
- name: Show all tenants
run: |
echo "this is tenant: ${{ matrix.TENANT }}"