Emoji List Updater #1514
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: "Emoji List Updater" | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
push: | |
paths: | |
- .github/scripts/markdown.php | |
- .github/scripts/index.html | |
- .github/scripts/readme.md | |
- .github/scripts/downloader.php | |
branches: | |
- main | |
jobs: | |
readme_generator: | |
name: "Emoji Readme Generator" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "📥 Fetching Repository Contents" | |
uses: actions/checkout@master | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
- name: Render Markdown | |
run: php .github/scripts/markdown.php | |
- name: Downloads Images | |
run: php .github/scripts/downloader.php | |
- name: Push To Github | |
run: | | |
git config --global user.email "githubactionbot@gmail.com" | |
git config --global user.name "Github Action Bot" | |
git add README.md -f | |
git add index.html -f | |
git add emojis/** -f | |
if [ "$(git status --porcelain)" != "" ]; then | |
git commit -m "💬 - Emoji Updated" | |
fi | |
git push "https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |