Skip to content

Update Emojis

Update Emojis #63

Workflow file for this run

name: Update Emojis
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # every Sunday at midnight (UTC)
jobs:
update_emojis:
runs-on: ubuntu-latest
steps:
- name: Clone microsoft/fluentui-emoji
uses: actions/checkout@v4
with:
repository: microsoft/fluentui-emoji
token: ${{ secrets.GITHUB_TOKEN }}
path: emojis/regular
- name: Clone Tarikul-Islam-Anik/Animated-Fluent-Emojis
uses: actions/checkout@v4
with:
repository: Tarikul-Islam-Anik/Animated-Fluent-Emojis
token: ${{ secrets.GITHUB_TOKEN }}
path: emojis/animated
- uses: actions/checkout@v4
with:
path: cdn
- name: Set Up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Requirements
run: pip install -r cdn/src/update_emojis/requirements.txt
- name: Execute script
run: python cdn/src/update_emojis/main.py
# - name: Downscale PNG images
# run: |
# cd cdn
# for emoji in $(ls Emojis); do
# for style in 3d animated; do
# if [ -d "Emojis/$emoji/$style" ]; then
# for size in 128 64; do
# if [ -d "Emojis/$emoji/$style/default" ]; then
# for skinTone in $(ls Emojis/$emoji/$style); do
# convert -coalesce Emojis/$emoji/$style/$skinTone/256.png -resize $sizex$size Emojis/$emoji/$style/$skinTone/$size.png
# done
# else
# convert -coalesce Emojis/$emoji/$style/256.png -resize $sizex$size Emojis/$emoji/$style/$size.png
# fi
# done
# fi
# done
# done
# ------- PULL REQUEST -------
- name: Create pull Requirements
uses: peter-evans/create-pull-request@v5
with:
path: cdn
title: 'Update emojis'
author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
committer: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
commit-message: 'Update emojis'
reviewers: malte9799
branch: update
delete-branch: true
token: ${{ secrets.GITHUB_TOKEN }}
# ------- PUSH -------
# - name: Git config
# run: |
# cd cdn
# git config user.name 'github-actions[bot]'
# git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
# - name: Add changes
# run: |
# cd cdn
# git config http.postBuffer 524288000
# # git lfs track "*.png"
# git add Emojis -f
# - name: Push changes
# run: |
# cd cdn
# git diff --cached --binary | wc -c
# if ! git diff-index --quiet HEAD; then
# git commit -m "Updates"
# git push -v
# else
# echo "No changes detected!"
# fi