Get versions #174
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/"' |