🖥

Github Actions – Ubuntuのフォントをキャッシュ&リストアする ( Noto Font の例 )

2024/05/09に公開

Workflowの例

/usr/share/fonts/ にフォントがインストールされるようなので、このディレクトリを対象にキャッシュ保存・リストアをするだけで良いようだ

jobs:
  font-cache:
    runs-on: ubuntu-latest
    steps:
      - name: Restore or Save Cache – Font Noto
        id: cache-font-noto
        uses: actions/cache@v4
        with:
          path: /usr/share/fonts/opentype/noto
          key: font-noto-cache-key

      - name: Install fonts-noto
        run: sudo apt install fonts-noto-cjk
        if: ${{ steps.cache-font-noto.outputs.cache-hit != 'true' }}

DockerでUbuntのフォントインストールを確認してみる例

$ docker run -it ubuntu
apt update
apt install fonts-noto-cjk

ls /usr/share/fonts/

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

プロフィール・経歴

https://github.com/YumaInaura/YumaInaura

公開日時

2024-04-30

GitHubで編集を提案

Discussion