Skip to content

Consistent End-User Meta #2

Consistent End-User Meta

Consistent End-User Meta #2

name: Consistent End-User Meta
on:
push:
branches:
- main
paths:
- README.md
workflow_dispatch:
jobs:
meta-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: "20"
- name: Install dependencies
run: |
mkdir -p temp && cd temp
yarn init -y
yarn add node-html-parser marked @octokit/rest -S
- name: Download Hero program
run: |
curl -o temp/update-meta.js https://raw.githubusercontent.com/darsan-in/.github/main/utils/update-meta.js
- name: Update meta
env:
GITHUB_TOKEN: ${{ secrets.META_UPDATE_KEY }}
REPO_META: ${{ github.repository }}
run: |
cd temp
node update-meta.js
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -f "package.json" ]; then
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add package.json
git commit -m 'End-User Meta updated'
git push
fi