fix(ci): markdown png not updated
This commit is contained in:
39
.github/scripts/files/examples.yml
vendored
39
.github/scripts/files/examples.yml
vendored
@@ -39,6 +39,11 @@ jobs:
|
|||||||
|
|
||||||
<%- steps.split("\n").map(line => ` ${line}`).join("\n") %>
|
<%- steps.split("\n").map(line => ` ${line}`).join("\n") %>
|
||||||
|
|
||||||
|
- name: Screenshot markdown example
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
run: |
|
||||||
|
node /metrics/.github/scripts/markdown_example.mjs
|
||||||
|
mv metrics.markdown.png /
|
||||||
- name: Publish examples
|
- name: Publish examples
|
||||||
if: ${{ success() || failure() }}
|
if: ${{ success() || failure() }}
|
||||||
run: |
|
run: |
|
||||||
@@ -46,42 +51,11 @@ jobs:
|
|||||||
sudo mv /metrics_renders/* ./
|
sudo mv /metrics_renders/* ./
|
||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
git pull
|
||||||
git add --all
|
git add --all
|
||||||
git commit -m "chore: update examples"
|
git commit -m "chore: update examples"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
# ======================================================================================
|
|
||||||
# Markdown as png (for readme updates)
|
|
||||||
# ======================================================================================
|
|
||||||
|
|
||||||
examples-markdown:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: "github.repository == 'lowlighter/metrics'"
|
|
||||||
container: ghcr.io/lowlighter/metrics:master
|
|
||||||
needs: [examples]
|
|
||||||
steps:
|
|
||||||
- name: Screenshot markdown example
|
|
||||||
run: |
|
|
||||||
node /metrics/.github/scripts/markdown_example.mjs
|
|
||||||
echo "METRICS_MARKDOWN_EXAMPLE=$(base64 --wrap=0 metrics.markdown.png)" >> $GITHUB_ENV
|
|
||||||
- name: Update markdown example
|
|
||||||
uses: actions/github-script@v5
|
|
||||||
env:
|
|
||||||
METRICS_MARKDOWN_EXAMPLE: "${{ env.METRICS_MARKDOWN_EXAMPLE }}"
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
try {
|
|
||||||
const {data:{sha}} = await github.rest.repos.getContent({...context.repo, path:"metrics.markdown.png"})
|
|
||||||
console.log(`current sha: ${sha}`)
|
|
||||||
github.rest.repos.createOrUpdateFileContents({
|
|
||||||
...context.repo,
|
|
||||||
path:"metrics.markdown.png",
|
|
||||||
message:`Auto-generated metrics for run #${github.context ? github.context.runId : "0000000000"}`,
|
|
||||||
content:process.env.METRICS_MARKDOWN_EXAMPLE,
|
|
||||||
sha,
|
|
||||||
})
|
|
||||||
} catch (error) { console.log(error) }
|
|
||||||
|
|
||||||
# ======================================================================================
|
# ======================================================================================
|
||||||
# Special job used to render lowlighter/metrics repository assets
|
# Special job used to render lowlighter/metrics repository assets
|
||||||
# ======================================================================================
|
# ======================================================================================
|
||||||
@@ -153,6 +127,7 @@ jobs:
|
|||||||
sudo mv /metrics_renders/* ./
|
sudo mv /metrics_renders/* ./
|
||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
git pull
|
||||||
git add --all
|
git add --all
|
||||||
git commit -m "chore: update examples"
|
git commit -m "chore: update examples"
|
||||||
git push
|
git push
|
||||||
|
|||||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -154,7 +154,7 @@ jobs:
|
|||||||
docker-release:
|
docker-release:
|
||||||
name: Publish release to GitHub registry
|
name: Publish release to GitHub registry
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ action-master-test ]
|
needs: [ action-master-test, publish-examples ]
|
||||||
if: contains(github.event.head_commit.message, '[release]')
|
if: contains(github.event.head_commit.message, '[release]')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|||||||
41
.github/workflows/examples.yml
vendored
41
.github/workflows/examples.yml
vendored
@@ -664,7 +664,7 @@ jobs:
|
|||||||
base: ""
|
base: ""
|
||||||
plugin_starlists: yes
|
plugin_starlists: yes
|
||||||
plugin_starlists_limit_repositories: 2
|
plugin_starlists_limit_repositories: 2
|
||||||
plugin_starlists_only: 🤘 TC39
|
plugin_starlists_only: TC39
|
||||||
output_action: none
|
output_action: none
|
||||||
delay: 120
|
delay: 120
|
||||||
user: lowlighter
|
user: lowlighter
|
||||||
@@ -1132,6 +1132,11 @@ jobs:
|
|||||||
if: ${{ success() || failure() }}
|
if: ${{ success() || failure() }}
|
||||||
|
|
||||||
|
|
||||||
|
- name: Screenshot markdown example
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
run: |
|
||||||
|
node /metrics/.github/scripts/markdown_example.mjs
|
||||||
|
mv metrics.markdown.png /
|
||||||
- name: Publish examples
|
- name: Publish examples
|
||||||
if: ${{ success() || failure() }}
|
if: ${{ success() || failure() }}
|
||||||
run: |
|
run: |
|
||||||
@@ -1139,42 +1144,11 @@ jobs:
|
|||||||
sudo mv /metrics_renders/* ./
|
sudo mv /metrics_renders/* ./
|
||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
git pull
|
||||||
git add --all
|
git add --all
|
||||||
git commit -m "chore: update examples"
|
git commit -m "chore: update examples"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
# ======================================================================================
|
|
||||||
# Markdown as png (for readme updates)
|
|
||||||
# ======================================================================================
|
|
||||||
|
|
||||||
examples-markdown:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: "github.repository == 'lowlighter/metrics'"
|
|
||||||
container: ghcr.io/lowlighter/metrics:master
|
|
||||||
needs: [examples]
|
|
||||||
steps:
|
|
||||||
- name: Screenshot markdown example
|
|
||||||
run: |
|
|
||||||
node /metrics/.github/scripts/markdown_example.mjs
|
|
||||||
echo "METRICS_MARKDOWN_EXAMPLE=$(base64 --wrap=0 metrics.markdown.png)" >> $GITHUB_ENV
|
|
||||||
- name: Update markdown example
|
|
||||||
uses: actions/github-script@v5
|
|
||||||
env:
|
|
||||||
METRICS_MARKDOWN_EXAMPLE: "${{ env.METRICS_MARKDOWN_EXAMPLE }}"
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
try {
|
|
||||||
const {data:{sha}} = await github.rest.repos.getContent({...context.repo, path:"metrics.markdown.png"})
|
|
||||||
console.log(`current sha: ${sha}`)
|
|
||||||
github.rest.repos.createOrUpdateFileContents({
|
|
||||||
...context.repo,
|
|
||||||
path:"metrics.markdown.png",
|
|
||||||
message:`Auto-generated metrics for run #${github.context ? github.context.runId : "0000000000"}`,
|
|
||||||
content:process.env.METRICS_MARKDOWN_EXAMPLE,
|
|
||||||
sha,
|
|
||||||
})
|
|
||||||
} catch (error) { console.log(error) }
|
|
||||||
|
|
||||||
# ======================================================================================
|
# ======================================================================================
|
||||||
# Special job used to render lowlighter/metrics repository assets
|
# Special job used to render lowlighter/metrics repository assets
|
||||||
# ======================================================================================
|
# ======================================================================================
|
||||||
@@ -1246,6 +1220,7 @@ jobs:
|
|||||||
sudo mv /metrics_renders/* ./
|
sudo mv /metrics_renders/* ./
|
||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
git pull
|
||||||
git add --all
|
git add --all
|
||||||
git commit -m "chore: update examples"
|
git commit -m "chore: update examples"
|
||||||
git push
|
git push
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ with:
|
|||||||
base: ""
|
base: ""
|
||||||
plugin_starlists: yes
|
plugin_starlists: yes
|
||||||
plugin_starlists_limit_repositories: 2
|
plugin_starlists_limit_repositories: 2
|
||||||
plugin_starlists_only: 🤘 TC39
|
plugin_starlists_only: TC39
|
||||||
|
|
||||||
```
|
```
|
||||||
<!--/examples-->
|
<!--/examples-->
|
||||||
|
|||||||
@@ -6,6 +6,6 @@
|
|||||||
base: ""
|
base: ""
|
||||||
plugin_starlists: yes
|
plugin_starlists: yes
|
||||||
plugin_starlists_limit_repositories: 2
|
plugin_starlists_limit_repositories: 2
|
||||||
plugin_starlists_only: 🤘 TC39
|
plugin_starlists_only: TC39
|
||||||
test:
|
test:
|
||||||
timeout: 1800000
|
timeout: 1800000
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
|
|||||||
))
|
))
|
||||||
const count = lists.length
|
const count = lists.length
|
||||||
console.debug(`metrics/compute/${login}/plugins > starlists > found [${lists.map(({name}) => name)}]`)
|
console.debug(`metrics/compute/${login}/plugins > starlists > found [${lists.map(({name}) => name)}]`)
|
||||||
|
console.log(">>>>> DEBUG", lists.map(({name}) => name), lists.map(({name}) => imports.stripemojis(name ?? "").trim().toLocaleLowerCase()), only, ignored)
|
||||||
lists = lists
|
lists = lists
|
||||||
.filter(({name}) => {
|
.filter(({name}) => {
|
||||||
name = imports.stripemojis(name ?? "").trim().toLocaleLowerCase()
|
name = imports.stripemojis(name ?? "").trim().toLocaleLowerCase()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
token: MOCKED_TOKEN
|
token: MOCKED_TOKEN
|
||||||
plugin_starlists: 'yes'
|
plugin_starlists: 'yes'
|
||||||
plugin_starlists_limit_repositories: 2
|
plugin_starlists_limit_repositories: 2
|
||||||
plugin_starlists_only: 🤘 TC39
|
plugin_starlists_only: TC39
|
||||||
use_mocked_data: 'yes'
|
use_mocked_data: 'yes'
|
||||||
verify: 'yes'
|
verify: 'yes'
|
||||||
timeout: 1800000
|
timeout: 1800000
|
||||||
|
|||||||
Reference in New Issue
Block a user