mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [micalevisk/last-issue-action](https://github.com/micalevisk/last-issue-action) from 2.0.0 to 2.3.0.
- [Release notes](https://github.com/micalevisk/last-issue-action/releases)
- [Commits](044e1cb7e9...0d40124cc9
)
---
updated-dependencies:
- dependency-name: micalevisk/last-issue-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
name: Monthly check GitHub usernames
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 1 * *"
|
|
|
|
jobs:
|
|
check-usernames:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Restore lychee cache
|
|
id: restore-cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: .lycheecache
|
|
key: cache-lychee-${{ github.sha }}
|
|
restore-keys: cache-lychee-
|
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- run: |
|
|
cat .github/CODEOWNERS | grep -o "@[a-zA-Z0-9_-]\+" | sort -u | sed 's/@/https:\/\/api.github.com\/users\//' > usernames.txt
|
|
cat MAINTAINERS.md | grep -o "\*\*.*@[a-zA-Z0-9_-]\+.*\*\*" | grep -o "@[a-zA-Z0-9_-]\+" | sort -u | sed 's/@/https:\/\/api.github.com\/users\//' >> usernames.txt
|
|
sort -u usernames.txt -o usernames.txt
|
|
|
|
- name: Lychee URL checker
|
|
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 # v2.3.0
|
|
id: lychee
|
|
continue-on-error: true
|
|
with:
|
|
args: >-
|
|
--cache
|
|
--verbose
|
|
--no-progress
|
|
--max-concurrency 25
|
|
usernames.txt
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
- name: Find the last report issue open
|
|
uses: micalevisk/last-issue-action@0d40124cc99ac8601c2516007f0c98ef3d27537b # v2.3.0
|
|
id: last-issue
|
|
with:
|
|
state: open
|
|
labels: check usernames
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Update last report open issue created
|
|
if: ${{ env.lychee_exit_code != 0 }}
|
|
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
|
|
with:
|
|
title: GitHub usernames with errors
|
|
content-filepath: lychee/out.md
|
|
issue-number: ${{ steps.last-issue.outputs.issue-number }}
|
|
labels: check usernames
|
|
|
|
- name: Close last report open issue
|
|
if: ${{ env.lychee_exit_code == 0 && steps.last-issue.outputs.has-found == 'true' }}
|
|
run: gh issue close ${{ steps.last-issue.outputs.issue-number }}
|
|
|
|
- name: Save lychee cache
|
|
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
if: always()
|
|
with:
|
|
path: .lycheecache
|
|
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|