mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 20:11:19 +08:00
monthly-check: fix workflow (#20468)
This commit is contained in:
@@ -13,14 +13,6 @@ jobs:
|
||||
check-usernames:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restore lychee cache
|
||||
id: restore-cache
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: cache-lychee-${{ github.sha }}
|
||||
restore-keys: cache-lychee-
|
||||
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@@ -36,9 +28,8 @@ jobs:
|
||||
continue-on-error: true
|
||||
with:
|
||||
args: >-
|
||||
--cache
|
||||
--verbose
|
||||
--no-progress
|
||||
--verbose
|
||||
--no-progress
|
||||
--max-concurrency 25
|
||||
usernames.txt
|
||||
env:
|
||||
@@ -54,7 +45,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Update last report open issue created
|
||||
if: ${{ env.lychee_exit_code != 0 }}
|
||||
if: steps.lychee.outcome == 'failure'
|
||||
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
|
||||
with:
|
||||
title: GitHub usernames with errors
|
||||
@@ -63,12 +54,7 @@ jobs:
|
||||
labels: check usernames
|
||||
|
||||
- name: Close last report open issue
|
||||
if: ${{ env.lychee_exit_code == 0 && steps.last-issue.outputs.has-found == 'true' }}
|
||||
if: ${{ steps.lychee.outcome == 'success' && steps.last-issue.outputs.has-found == 'true' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh issue close ${{ steps.last-issue.outputs.issue-number }}
|
||||
|
||||
- name: Save lychee cache
|
||||
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||
if: always()
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|
||||
|
||||
Reference in New Issue
Block a user