Files
git-workflows/.gitea/scoped_workflows/sync-github-metadata.yml
T
Tirsvad a8c46ecdbe
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Skipped
Validate workflows / validate (pull_request) Successful in 58s
TirSystem/git-workflows: OpenGrep / opengrep (pull_request) Failing after 6s
TirSystem/git-workflows: Validate / validate (pull_request) Failing after 6s
Fetch the scoped workflow scripts at v3 and clear the scan findings
The scoped workflows fetched their scripts at v2 (v1 for the metadata sync),
which has none of the new scripts; the next release is 3.0.0, so they fetch v3.
Shorten the run block of publish-wiki-pages.yml to five lines (WF-20) and
silence the six OpenGrep ERROR findings that are list-form subprocess calls and
the parse of the project's own coverage report, each with its reason.

Task: MIL-016#4
Task: MIL-017#4
Task: MIL-018#4
Task: MIL-019#3
2026-10-29 13:56:22 +08:00

35 lines
1.1 KiB
YAML

name: Sync GitHub mirror metadata
# Scoped workflow: it runs in every repository of an organization. The script
# is a file of TirSystem/git-workflows (tools/sync_github_metadata.py), fetched
# with a checkout so that it is readable, lintable and tested as a file
# (MIL-004 task 6). The repository is public, so no token is needed.
on:
push:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: "17 3 * * *"
jobs:
sync-metadata:
permissions:
contents: read
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Fetch the shared script
uses: actions/checkout@v4.2.2
with:
repository: TirSystem/git-workflows
ref: v3
path: shared-scripts
- name: Sync description and topics
env:
GITEA_API_URL: ${{ gitea.api_url }}
GITEA_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA_REPO }}
SOURCE_REPOSITORY: ${{ gitea.repository }}
PAT_FOR_GITHUB: ${{ secrets.PAT_FOR_GITHUB }}
run: python3 shared-scripts/tools/sync_github_metadata.py