mirror of
https://github.com/andwati/gitea-mirror-sync.git
synced 2026-11-05 11:42:18 +00:00
28 lines
812 B
YAML
28 lines
812 B
YAML
name: Mirror GitHub repos to Gitea
|
|
|
|
on:
|
|
schedule:
|
|
# Runs at 00:00 UTC daily. Adjust if you want midnight EAT (UTC+3) instead — see note below.
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch: {} # allows manual trigger from the Actions tab too
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout (for the script)
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install jq
|
|
run: sudo apt-get update && sudo apt-get install -y jq
|
|
|
|
- name: Mirror all repos to Gitea
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
|
GITEA_URL: ${{ secrets.GITEA_URL }}
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
GITEA_OWNER: ${{ secrets.GITEA_OWNER }}
|
|
run: |
|
|
chmod +x ./mirror-github-to-gitea.sh
|
|
./mirror-github-to-gitea.sh
|