17 changed files with 1533 additions and 1383 deletions
@ -1,48 +0,0 @@ |
|||||||
name: Annotate linting |
|
||||||
|
|
||||||
permissions: |
|
||||||
actions: read # download artifact |
|
||||||
checks: write # annotate |
|
||||||
|
|
||||||
# this is done as a seperate workflow so |
|
||||||
# the annotater has access to write to checks (to annotate) |
|
||||||
on: |
|
||||||
workflow_run: |
|
||||||
workflows: ["Linting and Testing"] |
|
||||||
types: |
|
||||||
- completed |
|
||||||
|
|
||||||
jobs: |
|
||||||
annotate: |
|
||||||
name: Annotate linting |
|
||||||
runs-on: ubuntu-latest |
|
||||||
|
|
||||||
steps: |
|
||||||
- name: Download linting report |
|
||||||
uses: actions/github-script@v6 |
|
||||||
with: |
|
||||||
script: | |
|
||||||
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ |
|
||||||
owner: context.repo.owner, |
|
||||||
repo: context.repo.repo, |
|
||||||
run_id: ${{github.event.workflow_run.id }}, |
|
||||||
}); |
|
||||||
const matchArtifact = artifacts.data.artifacts.filter((artifact) => { |
|
||||||
return artifact.name == "eslint_report.json" |
|
||||||
})[0]; |
|
||||||
const download = await github.rest.actions.downloadArtifact({ |
|
||||||
owner: context.repo.owner, |
|
||||||
repo: context.repo.repo, |
|
||||||
artifact_id: matchArtifact.id, |
|
||||||
archive_format: 'zip', |
|
||||||
}); |
|
||||||
const fs = require('fs'); |
|
||||||
fs.writeFileSync('${{github.workspace}}/eslint_report.zip', Buffer.from(download.data)); |
|
||||||
|
|
||||||
- run: unzip eslint_report.zip |
|
||||||
|
|
||||||
- name: Annotate linting |
|
||||||
uses: ataylorme/eslint-annotate-action@v2 |
|
||||||
with: |
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
|
||||||
report-json: "eslint_report.json" |
|
||||||
@ -1,4 +1,4 @@ |
|||||||
|
export const APP_VERSION = import.meta.env.PACKAGE_VERSION; |
||||||
export const DISCORD_LINK = "https://discord.gg/Jhqt4Xzpfb"; |
export const DISCORD_LINK = "https://discord.gg/Jhqt4Xzpfb"; |
||||||
export const GITHUB_LINK = "https://github.com/movie-web/movie-web"; |
export const GITHUB_LINK = "https://github.com/movie-web/movie-web"; |
||||||
export const APP_VERSION = "3.0.6"; |
|
||||||
export const GA_ID = "G-44YVXRL61C"; |
export const GA_ID = "G-44YVXRL61C"; |
||||||
|
|||||||
Loading…
Reference in new issue