forked from pre-commit/mirrors-prettier
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (28 loc) · 926 Bytes
/
main.yml
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: main
on:
schedule:
- cron: "50 1 * * 1"
workflow_dispatch:
jobs:
update:
name: Upgrade hook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: git config user.name 'Github Actions'
- run: git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
- run: uv run --no-project .github/workflows/main.py
- run: |
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}
for tag in $(git tag); do
git push origin $tag
done
git push origin HEAD:refs/heads/main
# for-loop is required to trigger CI on the tags
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}