-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (68 loc) · 2.09 KB
/
versions.yaml
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
name: Get versions
on :
workflow_run:
workflows: [Docker Image CI]
types: [ completed ]
workflow_dispatch:
jobs:
get-versions:
runs-on: ubuntu-latest
permissions:
contents : write
pull-requests: write
steps :
# --------------------------
- name: Cache OpenAF runtime
uses: actions/cache@v3
with:
key : oaf
path: /tmp/oaf
# --------------
- name: Checkout
uses: actions/checkout@v3
## Add here other steps
# ---------------------
- name: Generate badges
uses: openaf/ojob-action@v4
with:
def : |
todo:
- name: Generate badge
args:
label: nmaguiar/hvscs:latest
file : .github/version-latest.svg
- name: Generate badge
args:
label: nmaguiar/hvscs:build
file : .github/version-build.svg
ojob:
opacks:
- Badgen
include:
- badgen.yaml
jobs:
# ---------------------
- name : Generate badge
check:
in:
label: isString.default("nmaguiar/hvscs:latest")
file : isString.default(".github/version-latest.svg")
to :
- name: Badgen generate file
args:
labelColor: grey3
color : blue
#icon : "openaf_grey.svg"
exec: |
var res = $sh("docker run --rm -t --entrypoint /bin/bash " + args.label + " /home/.openvscode-server/bin/openvscode-server -v | head -1").get(0)
cprint(res)
args.status = res.stdout.trim()
# -------------
- name: Checkin
uses: openaf/ojob-action@v4
env :
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ojob: ojob.io/git/hub/contentIn
## Change the following arguments as needed (see https://ojob.io/git/hub/contentIn.md)
args: 'message="Automated\ check\ in\ {{date}}/{{time}}" title="Badge\ update" paths=".github/"'