fix(workflow): update Docker logs step to always run and add fail-build job
This commit is contained in:
parent
a402d73ac6
commit
45ee587316
|
|
@ -115,5 +115,28 @@ jobs:
|
|||
labels: 'auto: DO NOT merge'
|
||||
|
||||
- name: Print Docker container logs
|
||||
if: (env.TEST_CONTINUE)
|
||||
if: ${{ always() }}
|
||||
run: docker logs rsshub # logs/combined.log? Not so readable...
|
||||
|
||||
fail-build:
|
||||
name: Fail build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
# https://github.com/orgs/community/discussions/25220
|
||||
- name: Search the PR that triggered this workflow
|
||||
uses: potiuk/get-workflow-origin@e2dae063368361e4cd1f510e8785cd73bca9352e # v1_5
|
||||
id: source-run-info
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
sourceRunId: ${{ github.event.workflow_run.id }}
|
||||
|
||||
- name: Pull Request Labeler
|
||||
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
||||
labels: 'auto: DO NOT merge'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import jsBeautify from 'js-beautify';
|
||||
|
||||
const routeTestFailed = 'auto: not ready to review';
|
||||
const readyToReview = 'auto: ready to review';
|
||||
|
||||
export default async function test({ github, context, core }, baseUrl, routes, number) {
|
||||
if (routes[0] === 'NOROUTE') {
|
||||
return;
|
||||
|
|
@ -71,7 +74,7 @@ ${detail.slice(0, 65300 - routeFeedback.length)}
|
|||
}
|
||||
|
||||
if (process.env.PULL_REQUEST) {
|
||||
const resultLabel = failCount === links.length || successCount <= failCount ? 'auto: not ready to review' : 'auto: ready to review';
|
||||
const resultLabel = failCount === links.length || successCount <= failCount ? routeTestFailed : readyToReview;
|
||||
await github.rest.issues
|
||||
.addLabels({
|
||||
issue_number: number,
|
||||
|
|
|
|||
Loading…
Reference in New Issue