Compare Versions #385
This file contains hidden or 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: Compare Versions | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '07 9 * * *' | |
| jobs: | |
| Compare-Versions: | |
| runs-on : ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| name : Compare Versions | |
| steps : | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| - name: Cache OpenAF runtime | |
| uses: actions/cache@v4 | |
| with: | |
| key : oaf-t8 | |
| path: /tmp/oaf | |
| - name: Setup OpenAF | |
| uses: openaf/action-setup@v2 | |
| with: | |
| dist: t8 | |
| - name: Preparing a lookup table for the build versions of the tools | |
| run : | | |
| oafp .github/softVersions-build.json out=ch ch="(type: file, options: (file: /tmp/_tmp.json))" chkey="pack" | |
| oafp /tmp/_tmp.json | |
| - name: Preparing a lookup table for the build lite versions of the tools | |
| run : | | |
| oafp .github/softVersions-build-lite.json out=ch ch="(type: file, options: (file: /tmp/_tmpbl.json))" chkey="pack" | |
| oafp /tmp/_tmpbl.json | |
| - name: Preparing a lookup table for the latest versions of the tools | |
| run : | | |
| oafp .github/softVersions-latest.json out=ch ch="(type: file, options: (file: /tmp/_tmpl.json))" chkey="pack" | |
| oafp /tmp/_tmpl.json | |
| - name: Preparing a lookup table for the lite versions of the tools | |
| run : | | |
| oafp .github/softVersions-lite.json out=ch ch="(type: file, options: (file: /tmp/_tmpll.json))" chkey="pack" | |
| oafp /tmp/_tmpll.json | |
| - name: Joining the versions retrieved to produce a markdown table | |
| run : | | |
| oafp chs="[(name: v, type: file, options: (file: /tmp/_tmp.json))|(name: bl, type: file, options: (file: /tmp/_tmpbl.json))|(name: l, type: file, options: (file: /tmp/_tmpl.json))|(name: ll, type: file, options: (file: /tmp/_tmpll.json))]"\ | |
| data="[]"\ | |
| path="ch('v','getAll',__,__)[].{tool:pack,buildVersion:nvl(version,'n/a'),latestVersion:nvl(ch('l','get',{pack:pack},__).version,'n/a'),buildLiteVersion:nvl(ch('bl','get',{pack:pack},__).version,'n/a'),liteVersion:nvl(ch('ll','get',{pack:pack},__).version,'n/a')}"\ | |
| out=mdtable\ | |
| sql="select * order by tool" > .github/compare-versions.md | |
| - uses: openaf/ojob-action@v7 | |
| name: Update table | |
| env : | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| ojob: 'ojob.io/git/hub/contentIn' | |
| args: 'message="update\ versions\ table\ {{date}}/{{time}}" title="Update\ table" paths=.github/' | |
| dist: t8 |