-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (28 loc) · 1.02 KB
/
update-emojis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
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>"