Skip to content

Commit eddde92

Browse files
committed
Update file structure
1 parent 8e7f77d commit eddde92

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/workflows/run_funcs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Run functions
22

3-
on: [push]
3+
on: [push, workflow_dispatch]
44

55
jobs:
6-
test_ruby_func:
6+
run_funcs:
77
runs-on: ubuntu-latest
88
name: A job to run funcs
99
steps:
@@ -12,14 +12,14 @@ jobs:
1212
- name: Run funcs
1313
uses: gitx-io/ActionServerless@master
1414
with:
15-
filepath: ./
15+
filepath: ./app
1616
- name: Git commit
1717
run: |
1818
# git commit if there's any change
1919
if test -n "$(git status --porcelain 2>/dev/null)"; then
2020
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
2121
git config --local user.name "github-actions[bot]"
2222
git add .
23-
git commit -m "Add changes"
23+
git commit -m "Update result"
2424
git push origin ${GITHUB_REF##*/}
2525
fi

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
This is a template repo for [ActionServerless](https://github.com/gitx-io/ActionServerless).
66

7-
We give a `helloworld` [example](https://github.com/gitx-io/ActionServerless-template/blob/master/hello.py) in Python, and its output is written to the file [hello_world](https://github.com/gitx-io/ActionServerless-template/blob/master/hello_world) according to the route we defined in `hello.py`.
7+
We give a `helloworld` [example](https://github.com/gitx-io/ActionServerless-template/blob/master/app/hello.py) in Python, and its output is written to the file [hello_world](https://github.com/gitx-io/ActionServerless-template/blob/master/app/hello_world) according to the route we defined in `hello.py`.
88

9-
If you'd like to follow the example, just use the template and put your code in the root directory and push the commit. The event to trigger the action we set is `push` event in the [workflows configuaration](https://github.com/gitx-io/ActionServerless-template/blob/master/.github/workflows/run_funcs.yml#L3), you can change it to other events. GitHub actions supports several [events](https://docs.github.com/en/actions/reference/events-that-trigger-workflows) to trigger workflows, such as `push`, `pull_request` or `schedule`. You can choose one or more of them depending on your application scenarios.
9+
If you'd like to follow the example, just use the template and put your code in the `app/` directory, that we've configured in workflow, and push the commit.
10+
11+
The events to trigger the action we set are `push` and `workflow_dispatch` in the [workflows configuaration](https://github.com/gitx-io/ActionServerless-template/blob/master/.github/workflows/run_funcs.yml#L3), you can change it to other events. GitHub actions supports several [events](https://docs.github.com/en/actions/reference/events-that-trigger-workflows) to trigger workflows, such as `push`, `pull_request` or `schedule`. You can choose one or more of them depending on your application scenarios.

hello.py renamed to app/hello.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
# GET /hello_world
2+
# GET /app/hello_world
33

44
print("hello world!")

hello_world

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)