GitHub action to setup OpenAF.
- name: Setup OpenAF
uses: openaf/action-setup@v2.0.0
- name: Using OpenAF
run : |
echo Recursive list of files order by size:
echo
oafp data="." in=ls lsrecursive=true\
sql="select filepath, permissions, size where isFile=TRUE order by size desc"\
out=ctable
After setup you will be able to use:
Command | Description |
---|---|
oaf | The main OpenAF runtime |
oafp | The OpenAF data processor |
ojob | The OpenAF's oJob orchestrator (although using openaf/ojob-action instead is recommended) |
opack | The OpenAF's package manager |
pyoaf | The Python OpenAF extensions runner (if available) |
oaf-sb | The main OpenAF runtime unix she-bang executor |
ojob-sb | The OpenAF's oJob unix she-bang executor |
oafp-sb | The OpenAF data processor she-bang executor |
To cache the OpenAF installation you can use GitHub Actions caching (saving, at least, around ~4/5 seconds of action execution) but you will have to be carefull with the management of the cache. Example:
- name: Cache OpenAF
uses: actions/cache@v4
with:
# you need to manage the cache in the best way specifically for your case
key : oaf
path: /tmp/oaf
- name: Setup OpenAF
uses: openaf/action-setup@v2.0.0
By default the 'stable' OpenAF distribution is used but you can specify a different one using the dist input:
- name: Setup OpenAF
uses: openaf/action-setup@v2.0.0
with:
dist: nightly
- name: Check OpenAF distribution
run : |
echo "The current OpenAF distribution is '$(oaf -c 'print(getDistribution())')'"
By default the latest version of the defined (or stable) distribution will be retrived. To specify it you can use the version input:
- name: Setup OpenAF
uses: openaf/action-setup@v2.0.0
with:
version: 20241117
- name: Check OpenAF version
run : |
echo "The current OpenAF version is '$(oaf -c 'print(getVersion())')'"
You can also list oPacks to be installed as part of the setup process:
- name: Setup OpenAF
uses: openaf/action-setup@v2.0.0
with:
opacks: oJob-common,GIST
- name: Check list of installed oPacks
run : |
opack list
Works together with https://github.com/OpenAF/ojob-action