Move to action to share code #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
schedule: | |
- cron: "30 8 * * *" | |
jobs: | |
build: | |
name: main | |
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 pre-commit-mirror-maker . --language=python --package-name=pyproject-fmt --types=file --types=text | |
--types=toml --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 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |