Validate workflows / validate (pull_request) Successful in 16s
tools/sync_github_metadata.py holds the 221 lines that were embedded in sync-github-metadata.yml, unchanged in behaviour and messages. The scoped workflow now checks out TirSystem/github-action at main and runs the file (33 lines instead of 230). The tests import the file instead of executing the YAML. Verified live from TirSystem-BashScript/RepoFoundry with that organisation's secrets. Task: MIL-004#6
34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
name: Sync GitHub mirror metadata
|
|
|
|
# Scoped workflow: it runs in every repository of an organization. The script
|
|
# is a file of TirSystem/github-action (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
|
|
steps:
|
|
- name: Fetch the shared script
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: TirSystem/github-action
|
|
ref: main
|
|
path: shared-scripts
|
|
|
|
- name: Sync description and topics
|
|
env:
|
|
GITEA_API_URL: ${{ gitea.api_url }}
|
|
GITEA_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA }}
|
|
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
|
PAT_FOR_GITHUB: ${{ secrets.PAT_FOR_GITHUB }}
|
|
run: python3 shared-scripts/tools/sync_github_metadata.py
|