Skip to content

Main readme begin

Main readme begin #31

Workflow file for this run

name: Build All
on: [pull_request]
jobs:
builds:
runs-on: ubuntu-latest
env:
VERSION: "v1.15.1"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install func
run: |
echo "Installing func ${{env.VERSION}}"
program_url="https://github.com/knative/func/releases/download/knative-${{env.VERSION}}/func_linux_amd64"
curl -SLO $program_url && mv func_linux_amd64 f && chmod +x f
cp f /usr/local/bin
f version
- name: Build Functions
run: |
WORKDIR=$(mktemp -d)
cd $WORKDIR
## NOTE: ls -d returns absolute path
## GITHUB_WORKSPACE is the root directory (checked out?)
#cycle through all languages
url="http://github.com/gauron99/func-templates"
for lang_dir_abs in $(ls -d ${GITHUB_WORKSPACE}/*/); do
lang=$(basename "$lang_dir_abs")
echo "Building funcs from $lang"
for template_dir_abs in $(ls -d $lang_dir_abs*/); do
template=$(basename "$template_dir_abs")
echo "Building '$template' template in '$lang'"
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
done