Skip to content

Commit 96e861f

Browse files
committed
Extract source code to a separated lib: GitFx
1 parent 176f411 commit 96e861f

20 files changed

Lines changed: 18 additions & 257 deletions

.github/workflows/test_parse_funcs.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/test_run_funcs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Run funcs
1515
uses: ./
1616
with:
17-
filepath: test/func_samples
17+
filepath: test/func_examples
1818
- name: Check if result files exist
1919
run: |
2020
cd test/result
@@ -40,7 +40,7 @@ jobs:
4040
ruby.json
4141
ruby_second.json
4242
43-
test_pre_hook
43+
test_before_script
4444
4545
bash_string
4646
bash.json

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![ActionServerless Testing](https://github.com/gitx-io/ActionServerless/workflows/Test%20run%20funcs/badge.svg)](https://github.com/gitx-io/ActionServerless/blob/master/.github/workflows/test_run_funcs.yml)
44

5-
ActionServerless is an action to do some computing and then generate a string/JSON file to a path, you can visit the file as a service when in dev/testing, or even in your production. We may take it as a GitHub Actions powered `serverless` service.
5+
ActionServerless is an action using [GitFx](https://github.com/gitx-io/GitFx) to do some computing and then generate a string/JSON file to a path, you can visit the file as a service when in dev/testing, or even in your production. We may take it as a GitHub Actions powered `serverless` service.
66

77
In fact you can do all of these in native GitHub actions. ActionServerless just wraps the steps to simplify the work:
88

@@ -24,26 +24,17 @@ print(json.dumps({"hello": "world"}))
2424

2525
put the file to a path(default is the root path of a repo, otherwise you need add the path as an argument to your actions configuaration), when you push the code the action will be triggered. Then the program's output is written to a file located in `api/py_hello.json` that you defined as a route in the comment.
2626

27-
more languages' examples you can find [here](https://github.com/gitx-io/ActionServerless/tree/master/test/func_samples).
27+
more languages' examples you can find [here](https://github.com/gitx-io/GitFx/tree/master/test/func_examples).
2828

2929
## Languages supported
3030

31-
| Language | Dependency Installation | Example code |
32-
| ------------- | ------------- | :------------: |
33-
| Python |`requirements.txt` | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.py) |
34-
| Ruby |`Gemfile` | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.rb) |
35-
| Node.js |`package.json` | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.js) |
36-
| Perl |`cpanfile` | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.pl) |
37-
| Golang | ⬜️ not supported yet | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.go) |
38-
| Haskell | ⬜️ not supported yet | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.hs) |
39-
| Elixir | ⬜️ not supported yet | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.exs) |
40-
| PHP | ⬜️ not supported yet | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.php) |
41-
| Bash | - | [See](https://github.com/gitx-io/ActionServerless/blob/master/test/func_samples/function.sh) |
31+
See: https://github.com/gitx-io/GitFx#languages-supported
32+
4233

4334
## Documents
4435

45-
* [Pre-hook script](https://github.com/gitx-io/ActionServerless/wiki/Pre-hook-script)
46-
* [HTTP Headers](https://github.com/gitx-io/ActionServerless/wiki/HTTP-Headers)
36+
* [before_script](https://github.com/gitx-io/GitFx/wiki/before_script)
37+
* [HTTP Headers](https://github.com/gitx-io/GitFx/wiki/HTTP-Headers)
4738

4839
## Real world examples
4940

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ runs:
88
using: "composite"
99
steps:
1010
- id: run-funcs
11-
run: python3 ${{ github.action_path }}/run_funcs.py ${{ inputs.filepath }}
11+
run: |
12+
python3 -m pip install gitfx
13+
python3 -m gitfx ${{ inputs.filepath }}
1214
shell: bash
1315
branding:
1416
icon: 'cloud-lightning'

parse_funcs.py

Lines changed: 0 additions & 85 deletions
This file was deleted.

run_funcs.py

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)