diff --git a/.github/workflows/cruft.yml b/.github/workflows/cruft.yml deleted file mode 100644 index 25ef098..0000000 --- a/.github/workflows/cruft.yml +++ /dev/null @@ -1,84 +0,0 @@ -# from https://cruft.github.io/cruft/#automating-updates-with-github-actions - -name: Update repository with Cruft - -permissions: {} - -on: - workflow_dispatch: - schedule: - - cron: "0 2 * * 1" # Every Monday at 2am - -jobs: - update: - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - include: - - add-paths: . - body: Use this to merge the changes to this repository. - branch: cruft/update - commit-message: "chore: accept new Cruft update" - title: New updates detected with Cruft - - add-paths: .cruft.json - body: Use this to reject the changes in this repository. - branch: cruft/reject - commit-message: "chore: reject new Cruft update" - title: Reject new updates detected with Cruft - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: "3.10" - - # cf. https://github.com/astral-sh/setup-uv?tab=readme-ov-file#usage - - name: Install the latest version of uv - uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1 - - - name: Install Cruft - run: uv tool install cruft - - - name: Check if update is available - continue-on-error: false - id: check - run: | - CHANGES=0 - if [ -f .cruft.json ]; then - if ! cruft check; then - CHANGES=1 - fi - else - echo "No .cruft.json file" - fi - - echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT" - - - name: Run update if available - if: steps.check.outputs.has_changes == '1' - run: | - git config --global user.email "you@example.com" - git config --global user.name "GitHub" - - cruft update --skip-apply-ask --refresh-private-variables - git restore --staged . - - - name: Create pull request - if: steps.check.outputs.has_changes == '1' - uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - add-paths: ${{ matrix.add-paths }} - commit-message: ${{ matrix.commit-message }} - branch: ${{ matrix.branch }} - delete-branch: true - branch-suffix: timestamp - title: ${{ matrix.title }} - body: | - This is an autogenerated PR. ${{ matrix.body }} - - [Cruft](https://cruft.github.io/cruft/) has detected updates from the Cookiecutter repository.