-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.29 KB
/
build-all.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
echo "Building funcs in $lang_dir_abs"
for template_dir_abs in $(ls -d lang_dir_abs*/); do
template=$(basename $template_dir_abs)
echo "Building '$template' template in '$lang_dir' directory"
f create $lang_dir-$template -r="url" -l=$lang_dir -t=$template
#FUNC_ENABLE_HOST_BUILDER=1 FUNC_BUILDER=host FUNC_CONTAINER=false FUNC_REGISTRY=docker.io/4141gauron3268 f
done
done