Skip to content

Commit

Permalink
ci: workflow to generate feature matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed Jul 30, 2024
1 parent fdb7572 commit 90ae104
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/feature_matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Sync Feature Matrix

on:
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Download and parse sheet
env:
SHEET_ID: ${{ secrets.FEATURE_MATRIX_SHEET_ID }}
run: curl -s https://docs.google.com/spreadsheets/d/$SHEET_ID/gviz/tq?tqx=out:html | pandoc --from html --to markdown_strict+pipe_tables -o doc/src/feature-matrix.md
- name: Clean up the document
run: |
# add title
sed -i "1i# Feature Matrix\nComparison of implemented features across Revolt's clients.\n" doc/src/feature-matrix.md
# replace the indicators
sed -i 's/| O /| ✅ /g' doc/src/feature-matrix.md
sed -i 's/| X /| ❌ /g' doc/src/feature-matrix.md
sed -i 's/| Partly /| 🚧 /g' doc/src/feature-matrix.md
sed -i 's/| NoPlan /| ⛔ /g' doc/src/feature-matrix.md
# remove extra rows
sed -i '4d' doc/src/feature-matrix.md
sed -i '4d' doc/src/feature-matrix.md
sed -i '4d' doc/src/feature-matrix.md
# set column properties again (while adding header line)
sed -i '5i |---|---|---|---|:-:|:-:|:-:|:-:|:-:|' doc/src/feature-matrix.md
- name: Commit changes
run: |
git config --global user.name 'Revolt CI'
git config --global user.email '[email protected]'
git commit -am "chore(docs): update feature matrix"
git push

0 comments on commit 90ae104

Please sign in to comment.