-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.03 KB
/
github-action.yml
File metadata and controls
82 lines (70 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Update package
on:
push:
branches: [ main ]
#pull_request:
# branches: [ main ]
workflow_dispatch:
jobs:
updateOPack:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps :
# --------------------------
- name: Cache OpenAF runtime
uses: actions/cache@v3
with:
key : oaf-nightly
path: /tmp/oaf
# -------------------------
- uses: actions/checkout@v2
# ------------------
- name: Generate oPack
uses: openaf/ojob-action@v7
with:
script: | #js
ow.loadFormat()
oPack("genpack . --exclude .github")
var pack = io.readFileYAML(".package.yaml")
pack.version = ow.format.fromDate(new Date(), "yyyyMMdd")
io.writeFileYAML(".package.yaml", pack)
dist : 'nightly'
# --------------------------
- name: Update version badge
uses: openaf/ojob-action@v4
with:
def : | #yaml
todo:
- Update badge with version
ojob:
opacks:
- Badgen
include:
- badgen.yaml
jobs:
# -------------------------------
- name: Update badge with version
from: Get version
to :
- name: Badgen generate file
args:
labelColor: grey3
color : blue
icon : "openaf_grey.svg"
label : "mini-a"
file : ".github/version.svg"
# -----------------
- name: Get version
exec: args.status = io.readFileYAML(".package.yaml").version
dist: 'nightly'
# -------------
- name: Checkin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: openaf/ojob-action@v4
with:
ojob: 'ojob.io/git/hub/contentIn'
args: 'message="Update\ package" title="Update\ package" paths=.github/version.svg,.package.yaml'
dist: 'nightly'