Skip to content

Mirror

Mirror #21

Workflow file for this run

name: Mirror
on:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
jobs:
build:
permissions:
contents: write
name: Mirror
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Setup git
run: |
git config --global user.name 'Github Actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Run mirror
run: |
uv run --script mirror.py
- name: Push changes
run: |
git remote set-url origin https://x-access-token:[email protected]/$GITHUB_REPOSITORY
git push origin HEAD:refs/heads/main --tags
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}