File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " setup oocana-python"
2+ description : " setup oocana-python on ubuntu-latest with optional layer"
3+ inputs :
4+ token :
5+ description : " GitHub token"
6+ required : true
7+ default : ${{ github.token }}
8+ create-layer :
9+ description : " create layer"
10+ required : false
11+ default : " false"
12+ ref :
13+ description : " GitHub ref"
14+ required : false
15+ default : " "
16+ path :
17+ description : " GitHub path"
18+ required : false
19+ default : " ."
20+
21+ runs :
22+ using : " composite"
23+ steps :
24+ - uses : actions/checkout@v4
25+ with :
26+ repository : oomol/oocana-python
27+ path : ${{ inputs.path }}
28+ ref : ${{ inputs.ref }}
29+ token : ${{ inputs.token }}
30+ - uses : pdm-project/setup-pdm@v4
31+ with :
32+ cache : true
33+ python-version : " 3.10"
34+ python-version-file : ${{ inputs.path }}/pyproject.toml
35+ cache-dependency-path : ${{ inputs.path }}/pdm.lock
36+ - name : install dependencies
37+ run : pdm install
38+ shell : bash
39+ working-directory : ${{ inputs.path }}
40+ - name : build
41+ run : pdm build
42+ shell : bash
43+ working-directory : ${{ inputs.path }}
44+ - name : static check
45+ run : pdm check
46+ shell : bash
47+ working-directory : ${{ inputs.path }}
48+ - name : create-layer
49+ if : ${{ inputs.create-layer != 'false' }}
50+ run : |
51+ python ./scripts/layer.py
52+ shell : bash
53+ working-directory : ${{ inputs.path }}
Original file line number Diff line number Diff line change 1+ name : " setup oocana-python action"
2+ on :
3+ workflow_dispatch :
4+ pull_request :
5+ branches :
6+ - main
7+ paths :
8+ - " .github/workflows/oocana-python.yml"
9+ - " scripts/**"
10+
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ jobs :
16+ action-test :
17+ runs-on : ubuntu-latest
18+ env :
19+ OVMLAYER_LOG : /tmp/ovmlayer.log
20+ steps :
21+ - uses : actions/checkout@v4
22+ - uses : oomol/oocana-rust/.github/actions/ovmlayer@main
23+ with :
24+ rootfs : https://github.com/oomol/ovmlayer-rootfs/releases/download/base-rootfs%400.3.0/amd64-rootfs.tar
25+ token : ${{ secrets.ACCESS_REPO }}
26+ - name : setup oocana-python action without layer
27+ uses : ./.github/actions/oocana-python
28+ with :
29+ ref : ${{ github.sha }}
30+ path : " oocana-python"
31+ - name : setup oocana-python action with layer
32+ uses : ./.github/actions/oocana-python
33+ with :
34+ ref : ${{ github.sha }}
35+ create-layer : " true"
36+ path : " oocana-python"
37+ - name : upload log
38+ if : failure()
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : ovmlayer-log
42+ path : /tmp/ovmlayer.log
You can’t perform that action at this time.
0 commit comments