Skip to content

Wow, that's interesting. #38

Wow, that's interesting.

Wow, that's interesting. #38

name: Wow, that's interesting.
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
check-and-update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Check for languages.yml changes and run script
run: |
curl -s https://raw.githubusercontent.com/github-linguist/linguist/main/lib/linguist/languages.yml > languages.yml
python scripts/gen.py
rm languages.yml
- name: Commit and push if changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add Languages/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Wow, that's interesting."
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}