Manual Flow Testing #19
Workflow file for this run
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
| name: Manual Flow Testing | |
| on: workflow_dispatch | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| languages: ${{ steps.get-matrix.outputs.languages }} | |
| env: | |
| FUNC_VERSION: "knative-v1.16.1" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install func | |
| uses: gauron99/knative-func-action@main | |
| with: | |
| version: ${{ env.FUNC_VERSION }} | |
| name: func | |
| - name: Get Matrix | |
| id: get-matrix | |
| run: | | |
| WORKDIR=$(mktemp -d) | |
| cd $WORKDIR | |
| echo "did the cd work?" | |
| pwd | |
| ## NOTE: ls -d returns absolute path | |
| ## GITHUB_WORKSPACE is the root directory | |
| echo "TO MATRIX: $(ls -d ${GITHUB_WORKSPACE}/*/)" | |
| echo "languages=$(ls -d ${GITHUB_WORKSPACE}/*/ | jq -R -s 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
| deploy: | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| language: ${{ fromJSON(needs.prepare.outputs.languages) }} | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build Functions | |
| run: | | |
| lang=$(basename "$lang_dir_abs") | |
| echo "Building funcs in language $lang" | |
| for template_dir_abs in $(ls -d $lang_dir_abs*/); do | |
| echo "ls -la" | |
| ls -la | |
| echo "pwd" | |
| pwd | |
| echo "ls -la ${GITHUB_WORKSPACE}" | |
| ls -la ${GITHUB_WORKSPACE} | |
| template=$(basename "$template_dir_abs") | |
| echo "f create $lang-$template -r=$url -l=$lang -t=$template" | |
| f create $lang-$template -r "$url" -l "$lang" -t "$template" | |
| #FUNC_ENABLE_HOST_BUILDER=1 FUNC_BUILDER=host FUNC_CONTAINER=false FUNC_REGISTRY=docker.io/4141gauron3268 f done | |