| name: Sync ruff-dev | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: sync-ruff-dev-main | |
| cancel-in-progress: false | |
| env: | |
| UV_LOCKED: 1 | |
| jobs: | |
| sync: | |
| name: Sync ruff-dev | |
| if: github.repository == 'astral-sh/ruff' | |
| runs-on: ${{ github.repository_owner == 'astral-sh' && 'github-ubuntu-24.04-x86_64-2' || 'ubuntu-slim' }} | |
| environment: | |
| name: automations | |
| deployment: false | |
| permissions: | |
| id-token: write # for the credential broker | |
| steps: | |
| - name: Get ruff-dev token | |
| id: token | |
| uses: astral-sh/github-actions/simple-token-service@67dc9ee1ddc113eccd8116e7b949fb6cdcd89889 # 2026.11.16.0 | |
| with: | |
| exchange-url: ${{ secrets.STS_API_URL }}/exchange | |
| audience: ${{ secrets.STS_API_URL }} | |
| repository: astral-sh/ruff-dev | |
| # Workflow permission is required to sync changes to `.github/workflows`. | |
| permissions: | | |
| contents: write | |
| workflows: write | |
| - name: Sync main | |
| env: | |
| GH_TOKEN: ${{ steps.token.outputs.token }} | |
| run: | | |
| gh api \ | |
| --method POST \ | |
| repos/astral-sh/ruff-dev/merge-upstream \ | |
| --field branch=main |