-
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (28 loc) · 959 Bytes
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Mirror
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "30 8 * * *"
jobs:
build:
name: Mirror
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git config --global user.name 'Github Actions'
- run: git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- run: >-
uvx -p 3.13 --from pre-commit-mirror-maker pre-commit-mirror . \
--language=python --package-name=tox-toml-fmt --files-regex '(^|/)pyproject\.toml$'
- run: |
git remote set-url origin https://x-access-token:[email protected]/$GITHUB_REPOSITORY
git push origin HEAD:refs/heads/main --tags -f
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}