Update emojis #14
This file contains 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 emojis | |
on: | |
schedule: | |
- cron: "0 0 * * 0" # At 00:00 on Sunday | |
jobs: | |
update-emojis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: fetch json | |
run: | | |
curl -sX GET "https://emojisource.app/api/v1/emojis" -H "Authorization: Bearer ${{secrets.EMOJI_SOURCE_TOKEN}}" | jq -r 'map(del(.subgroup, .code_point))' > /tmp/emojis.json | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Minify json | |
run: | | |
python -c 'import json, sys;json.dump(json.load(sys.stdin), sys.stdout)' < /tmp/emojis.json > ./lua/emoji/emojis.json | |
- name: create PR | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
title: Update emojis | |
commit-message: "feat: update emojis" | |
delete-branch: true | |
commiter: github-actions[bot]@users.noreply.github.com | |
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" |