name: Auto Update on: push: branches: - main paths-ignore: - 'README.md' - 'github-emoji.json' pull_request: branches: - main schedule: - cron: '0 0 * * *' jobs: build: runs-on: ubuntu-latest env: AUTO_COMMIT_MESSAGE: Auto Update by GitHub Actions AUTO_COMMIT_AUTHOR: github-actions[bot] AUTO_COMMIT_EMAIL: github-actions[bot]@users.noreply.github.com AUTO_COMMIT_NO_UPDATE: No update, nothing to commit steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v4 with: node-version: '*' cache: 'yarn' - name: Install Dependencies run: yarn install --immutable --immutable-cache --check-cache - name: Generate the GitHub Emoji Icon List Markdown run: yarn start # Commit and push the README.md and Json file - name: Update the README.md (Commit and Push) run: | git config --global user.name "${{ env.AUTO_COMMIT_AUTHOR }}" git config --global user.email "${{ env.AUTO_COMMIT_EMAIL }}" git add README.md github-emoji.json git commit -m "${{ env.AUTO_COMMIT_MESSAGE }}" || echo "${{ env.AUTO_COMMIT_NO_UPDATE }}" git push