Skip to content

Merge branch 'main' of https://github.com/sinazadeh/userscripts #86

Merge branch 'main' of https://github.com/sinazadeh/userscripts

Merge branch 'main' of https://github.com/sinazadeh/userscripts #86

Workflow file for this run

name: Update userscript meta
permissions:
contents: write
on:
push:
paths:
- '*.user.js'
jobs:
extract_meta:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: true
- name: Extract metadata for all userscripts
run: |
shopt -s nullglob
for file in *.user.js; do
if [[ "$file" != *.meta.js ]]; then
out="${file%.user.js}.meta.js"
echo "Generating $out from $file"
sed -n '/^\/\/ ==UserScript==$/,/^\/\/ ==\/UserScript==$/p' "$file" > "$out"
fi
done
- name: Commit generated meta files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: update userscript meta'
file_pattern: '*.meta.js'
commit_user_name: 'github-actions'
commit_user_email: 'actions@github.com'