Skip to content

Commit f86d0cd

Browse files
committed
update workflows
1 parent f32ff6a commit f86d0cd

13 files changed

Lines changed: 231 additions & 48 deletions

.github/workflows/.gitrepo

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

.github/workflows/README.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# EBBS Workflows for GitHub
1+
# EBBS for GitHub
22

3-
Use [ebbs](https://github.com/eons-dev/bin_ebbs) for your git repo!
3+
Have [ebbs](https://github.com/eons-dev/bin_ebbs) manage your git repo!
44

55
## Usage
66

@@ -9,15 +9,17 @@ Make sure you have a valid EBBS github.json in the build folder of your director
99

1010
```json
1111
{
12+
"build_in" : "github",
1213
"clear_build_path" : true,
1314
"next": [
1415
{
1516
"build" : "publish",
16-
"run_when" : "release",
17+
"run_when_any" : "release",
1718
"copy" : [
1819
{"../../inc/" : "inc/"}
1920
],
2021
"config" : {
22+
"clear_build_path" : false,
2123
"visibility" : "public"
2224
}
2325
}
@@ -28,21 +30,48 @@ Make sure you have a valid EBBS github.json in the build folder of your director
2830

2931
### Subrepo
3032

31-
Make sure the workflow files are present in your .github/workflows folder.
33+
Github Actions cannot use `git submodule`. Thus, we must use [git subrepo](https://github.com/ingydotnet/git-subrepo).
3234

33-
Clone with [subrepo](https://github.com/ingydotnet/git-subrepo):
34-
```
35+
Clone with subrepo:
36+
```shell
3537
mkdir -p .github/workflows
3638
git subrepo clone https://github.com/eons-dev/part_ebbs-workflows.git .github/workflows
3739
```
3840

39-
### Additional Notes:
41+
## Features:
42+
43+
All ebbs workflows call your `build/github.json`.
4044

41-
These workflows provide the following events:
45+
### Activity Workflows
46+
47+
The following events trigger ebbs workflows:
4248
* "release"
4349
* "push"
4450
* "pull_request"
4551

46-
Any of those events can be used with the "run_when" json var, allowing you to use a single build.json for all your workflows.
52+
Any of those events can be used with the `"run_when_..."` json varr, allowing you to use a single build.json for all your workflows. See [the ebbs docs](https://github.com/eons-dev/bin_ebbs) for more info
53+
54+
For example:
55+
```json
56+
{
57+
"run_when_any": [
58+
"pull_request"
59+
]
60+
}
61+
```
4762

4863
If you would like additional environment variables, cli args, build steps, etc, you can always clone this repo or modify the subrepo clone to your liking.
64+
65+
### Scheduled Workflows
66+
67+
The following scheduled events triggers are also available:
68+
* `"daily"` (runs at 0000 UTC)
69+
* `"weekly"` (runs at 0100 UTC)
70+
* `"monthly"` (runs at 0200 UTC)
71+
72+
Each scheduled trigger is set to run 1 hour after the preceding frequencies trigger so that any conflicting behavior can be executed with an order of known precedence. If your ebbs execution takes longer than 1 hour, let us know and we can multiply the offset.
73+
74+
### Automatic Updates
75+
76+
Coming soon!
77+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ebbs schedule daily
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
schedule:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install ebbs
19+
run: |
20+
pip install ebbs
21+
pip install eot
22+
- name: Build
23+
env:
24+
repo_username: ${{ secrets.INFRASTRUCTURE_USERNAME }}
25+
repo_password: ${{ secrets.INFRASTRUCTURE_PASSWORD }}
26+
run: |
27+
cd build
28+
ebbs -v -e "github" -e "schedule" -e "daily"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ebbs schedule monthly
2+
3+
on:
4+
schedule:
5+
- cron: "0 2 1 * *"
6+
7+
jobs:
8+
schedule:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install ebbs
19+
run: |
20+
pip install ebbs
21+
pip install eot
22+
- name: Build
23+
env:
24+
repo_username: ${{ secrets.INFRASTRUCTURE_USERNAME }}
25+
repo_password: ${{ secrets.INFRASTRUCTURE_PASSWORD }}
26+
run: |
27+
cd build
28+
ebbs -v -e "github" -e "schedule" -e "monthly"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ebbs pull request event
1+
name: ebbs event pull request
22

33
on:
44
pull_request:
@@ -25,4 +25,4 @@ jobs:
2525
repo_password: ${{ secrets.INFRASTRUCTURE_PASSWORD }}
2626
run: |
2727
cd build
28-
ebbs -v . --config "github.json" --event "pull_request"
28+
ebbs -v -e "github" -e "pull_request"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ebbs push event
1+
name: ebbs event push
22

33
on:
44
push:
@@ -25,4 +25,4 @@ jobs:
2525
repo_password: ${{ secrets.INFRASTRUCTURE_PASSWORD }}
2626
run: |
2727
cd build
28-
ebbs -v . --config "github.json" --event "push"
28+
ebbs -v -e "github" -e "push"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ebbs release event
1+
name: ebbs event release
22

33
on:
44
release:
@@ -29,4 +29,4 @@ jobs:
2929
repo_password: ${{ secrets.INFRASTRUCTURE_PASSWORD }}
3030
run: |
3131
cd build
32-
ebbs -v . --config "github.json" --version "${{ github.event.release.tag_name }}" --event "release"
32+
ebbs -v -e "github" -e "release" --version "${{ github.event.release.tag_name }}"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ebbs schedule weekly
2+
3+
on:
4+
schedule:
5+
- cron: "0 1 * * 1"
6+
7+
jobs:
8+
schedule:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install ebbs
19+
run: |
20+
pip install ebbs
21+
pip install eot
22+
- name: Build
23+
env:
24+
repo_username: ${{ secrets.INFRASTRUCTURE_USERNAME }}
25+
repo_password: ${{ secrets.INFRASTRUCTURE_PASSWORD }}
26+
run: |
27+
cd build
28+
ebbs -v -e "github" -e "schedule" -e "weekly"

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#build
22
build/**/
3-
/local/
4-
build.json
3+
!/build/config/
54

65
#intellij
7-
/.idea/
6+
/.idea/

build/build.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "emi",
3+
"type": "bin",
4+
"clear_build_path" : true,
5+
"build_in" : "tmp",
6+
"next": [
7+
{
8+
"run_when_none" : [
9+
"github"
10+
],
11+
"build" : "proxy",
12+
"build_in" : "local",
13+
"copy" : [
14+
{"../../src/" : "local/src/"},
15+
{"../../inc/" : "local/inc/"},
16+
{"../../test/" : "local/test/"},
17+
{"../../README.md" : "local/README.md"},
18+
{"../../LICENSE" : "local/LICENSE"}
19+
],
20+
"config" : {
21+
"clear_build_path" : false,
22+
"proxy" : "../config/local.json"
23+
}
24+
},
25+
{
26+
"run_when_any" : [
27+
"github"
28+
],
29+
"build" : "proxy",
30+
"build_in" : "github",
31+
"config" : {
32+
"clear_build_path" : false,
33+
"proxy" : "../config/github.json"
34+
}
35+
}
36+
]
37+
}

0 commit comments

Comments
 (0)