Update supported languages #14
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: Update supported languages | |
on: | |
schedule: | |
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of the month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# * * * * * | |
- cron: "0 0 */30 * *" | |
permissions: | |
actions: read | |
checks: read | |
contents: write | |
deployments: read | |
issues: read | |
discussions: read | |
packages: read | |
pages: read | |
pull-requests: write | |
repository-projects: read | |
security-events: read | |
statuses: read | |
jobs: | |
updateLanguages: | |
if: github.repository == 'anuraghazra/github-readme-stats' | |
name: Update supported languages | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup Node | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
env: | |
CI: true | |
- name: Run update-languages-json.js script | |
run: npm run generate-langs-json | |
- name: Create Pull Request if upstream language file is changed | |
uses: peter-evans/create-pull-request@8867c4aba1b742c39f8d0ba35429c2dfa4b6cb20 # v7.0.1 | |
with: | |
commit-message: "refactor: update languages JSON" | |
branch: "update_langs/patch" | |
delete-branch: true | |
title: Update languages JSON | |
body: | |
"The | |
[update-langs](https://github.com/anuraghazra/github-readme-stats/actions/workflows/update-langs.yaml) | |
action found new/updated languages in the [upstream languages JSON | |
file](https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml)." | |
labels: "ci, lang-card" |