mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-03-29 20:54:39 +02:00
CI: Try to commit changes only if we optimized some svgs
[why] When so svg files could be optimized we still try to commit the 'changes'. There are no changes - so nothing is committed (empty commits are avoided). But the workflow run still shows the 'commit back to repo' step, although we know beforehand that it will not commit anything. [how] Technically that is no problem and the behavior is unchanged, but we can just skip the commit step if we know there can not be anything to commit... It just looks nicer :-} Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
eca92e3bd9
commit
3fd15de2a3
7
.github/workflows/packsvgs.yml
vendored
7
.github/workflows/packsvgs.yml
vendored
@ -21,11 +21,16 @@ jobs:
|
||||
sudo apt install python3-fontforge inkscape texlive-binaries dc -y -q
|
||||
|
||||
- name: Simplify the SVGs
|
||||
id: optimize
|
||||
run: |
|
||||
cd bin/scripts
|
||||
./optimize-original-source.sh doit
|
||||
./optimize-original-source.sh doit | tee optlog.txt
|
||||
changenum=$(tail -n 1 optlog.txt | sed -E 's/[^0-9]*([0-9]+).*/\1/')
|
||||
echo "Script claims number of changed files: ${changenum}"
|
||||
echo "::set-output name=num_of_files::${changenum}"
|
||||
|
||||
- name: Commit simplified SVGs back to repo
|
||||
if: steps.optimize.outputs.num_of_files > 0
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
fetch: false
|
||||
|
Loading…
x
Reference in New Issue
Block a user