Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
YumaInaura opened this issue Apr 30, 2024 · 0 comments

Comments

@YumaInaura
Copy link
Owner

YumaInaura commented Apr 30, 2024

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

@YumaInaura YumaInaura changed the title Github Actions – Font Noto をキャッシュする Github Actions – フォントをキャッシュする ( Noto Font の例 ) Apr 30, 2024
@YumaInaura YumaInaura changed the title Github Actions – フォントをキャッシュする ( Noto Font の例 ) Github Actions – Ubuntuにフォントをキャッシュする ( Noto Font の例 ) Apr 30, 2024
@YumaInaura YumaInaura changed the title Github Actions – Ubuntuにフォントをキャッシュする ( Noto Font の例 ) Github Actions – Ubuntuのフォントをキャッシュ&リストアする ( Noto Font の例 ) Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant