CI: Fix patch-em-all: Purge destination dirs if possible

[why]
The purged (obsolete) files are still existing after release.

[how]
We restore the deleted files before it adds the new ones.
Just delete all font files and then download all the release files (all
newly created fonts).

`git add` on a directory will remove all missing files.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-08-18 18:25:59 +02:00 committed by Fini
parent 6e392c0b35
commit 2050b4dc16

View file

@ -211,6 +211,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare repo (clear out old and obsolete fonts)
run: |
cd -- "$GITHUB_WORKSPACE/patched-fonts"
find . -name "*.[to]tf" -exec rm {} \;
- name: Download patched fonts from build
id: download-patched-fonts
uses: actions/download-artifact@v2
@ -218,9 +223,9 @@ jobs:
name: patched-fonts
path: .
- uses: EndBug/add-and-commit@v7
- uses: EndBug/add-and-commit@v9
with:
add: 'patched-fonts'
message: Rebuilds patched fonts
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
committer_email: 41898282+github-actions[bot]@users.noreply.github.com