@@ -664,7 +664,7 @@ jobs:
664664 base : " "
665665 plugin_starlists : yes
666666 plugin_starlists_limit_repositories : 2
667- plugin_starlists_only : 🤘 TC39
667+ plugin_starlists_only : TC39
668668 output_action : none
669669 delay : 120
670670 user : lowlighter
@@ -1132,49 +1132,23 @@ jobs:
11321132 if : ${{ success() || failure() }}
11331133
11341134
1135+ - name : Screenshot markdown example
1136+ if : ${{ success() || failure() }}
1137+ run : |
1138+ node /metrics/.github/scripts/markdown_example.mjs
1139+ mv metrics.markdown.png /
11351140 - name : Publish examples
11361141 if : ${{ success() || failure() }}
11371142 run : |
11381143 set +e
11391144 sudo mv /metrics_renders/* ./
11401145 git config user.name github-actions[bot]
11411146 git config user.email 41898282+github-actions[bot]@users.noreply.github.com
1147+ git pull
11421148 git add --all
11431149 git commit -m "chore: update examples"
11441150 git push
11451151
1146- # ======================================================================================
1147- # Markdown as png (for readme updates)
1148- # ======================================================================================
1149-
1150- examples-markdown :
1151- runs-on : ubuntu-latest
1152- if : " github.repository == 'lowlighter/metrics'"
1153- container : ghcr.io/lowlighter/metrics:master
1154- needs : [examples]
1155- steps :
1156- - name : Screenshot markdown example
1157- run : |
1158- node /metrics/.github/scripts/markdown_example.mjs
1159- echo "METRICS_MARKDOWN_EXAMPLE=$(base64 --wrap=0 metrics.markdown.png)" >> $GITHUB_ENV
1160- - name : Update markdown example
1161- uses : actions/github-script@v5
1162- env :
1163- METRICS_MARKDOWN_EXAMPLE : " ${{ env.METRICS_MARKDOWN_EXAMPLE }}"
1164- with :
1165- script : |
1166- try {
1167- const {data:{sha}} = await github.rest.repos.getContent({...context.repo, path:"metrics.markdown.png"})
1168- console.log(`current sha: ${sha}`)
1169- github.rest.repos.createOrUpdateFileContents({
1170- ...context.repo,
1171- path:"metrics.markdown.png",
1172- message:`Auto-generated metrics for run #${github.context ? github.context.runId : "0000000000"}`,
1173- content:process.env.METRICS_MARKDOWN_EXAMPLE,
1174- sha,
1175- })
1176- } catch (error) { console.log(error) }
1177-
11781152# ======================================================================================
11791153# Special job used to render lowlighter/metrics repository assets
11801154# ======================================================================================
@@ -1246,6 +1220,7 @@ jobs:
12461220 sudo mv /metrics_renders/* ./
12471221 git config user.name github-actions[bot]
12481222 git config user.email 41898282+github-actions[bot]@users.noreply.github.com
1223+ git pull
12491224 git add --all
12501225 git commit -m "chore: update examples"
12511226 git push
0 commit comments