git: add workflow for auto mirroring git.yzbruh.space/YZBruh/pmt-renovated.
This commit is contained in:
25
.github/workflows/fetch-changes.yml
vendored
Normal file
25
.github/workflows/fetch-changes.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Mirror External Repo to GitHub
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Mirror external repo
|
||||
run: |
|
||||
git config --global user.name "github-actions"
|
||||
git config --global user.email "actions@github.com"
|
||||
git clone --mirror https://git.yzbruh.space/YZBruh/pmt-renovated.git temp-mirror
|
||||
cd temp-mirror
|
||||
git remote add github https://github.com/ShawkTeam/pmt-renovated.git
|
||||
git push --mirror github
|
||||
Reference in New Issue
Block a user