添加表情 所有人 dalia_everyone #92
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update wiki_emoji_list.md | |
| permissions: # 添加权限配置 | |
| contents: write # 允许推送更改 | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| paths: | |
| - "emoji/**" | |
| workflow_dispatch: # 添加手动触发 | |
| jobs: | |
| update-and-push: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout wiki repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.repository }}.wiki | |
| path: wiki | |
| - name: Checkout main repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: MeetWq/meme-generator | |
| path: main | |
| - name: Setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt install python3-pip | |
| pip3 install -U "meme_generator<0.2.0" filetype pillow | |
| - name: Install fonts | |
| run: | | |
| sudo apt install fonts-noto-color-emoji libgl1 libglx-mesa0 libgl1-mesa-dri libegl1 libegl-mesa0 | |
| sudo mkdir /usr/share/fonts/myfonts | |
| sudo cp main/resources/fonts/* /usr/share/fonts/myfonts/ | |
| fc-cache -fv | |
| - name: Change config | |
| run: | | |
| mkdir -p ~/.config/meme_generator | |
| echo -e "[meme]\nload_builtin_memes = false\nmeme_dirs = [\"$GITHUB_WORKSPACE/emoji\"]" > ~/.config/meme_generator/config.toml | |
| - name: Update memes.md | |
| run: python3 wiki/update_meme_list.py | |
| - name: Commit & Push changes | |
| uses: actions-js/push@master | |
| with: | |
| directory: "wiki" | |
| repository: ${{ github.repository }}.wiki | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| message: "update meme list" | |
| branch: "master" |