docker: Add font-patcher version tags to container

[why]
The font-patcher version of a concrete container is a useful information
if you want to use a not-latest version.

[how]
Add the font-patcher version, that is extracted by grep. Not the most
stable of all solutions but I guess it is good enough.

Fixes: #1267

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-06-02 11:14:09 +02:00
parent e2f8cd482c
commit 72e81a2f61

View file

@ -23,6 +23,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Determine font-patcher version
id: patcher
run: |
ver_raw=$(grep "^\s*script_version\s*=\s*[\"'][0-9.]*[\"']" font-patcher)
echo "VERSION RAW ${ver_raw}"
ver=$(sed -E "s/.*[\"']([0-9.]+)[\"'].*/v\1/" <<< "$ver_raw")
echo "VERSION ${ver}"
echo "version=${ver}" >> $GITHUB_OUTPUT
# Docker Meta provides automatic, standard tagging
- name: Docker meta
id: meta
@ -30,6 +39,8 @@ jobs:
with:
images: nerdfonts/patcher
flavor: latest=true
tags: |
type=semver,pattern={{version}},value={{ steps.patcher.outputs.version }}
# QEMU allows us to build container images for multiple architectures (amd64, ARM etc...)
- name: Set up QEMU