summaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/maintenance.yml
blob: 2dc3d7180f90832191bd3fad14ed94d15b6317a4 (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
name: Maintenance

on:
  schedule:
    # Weekly, at 02:30 UTC on Friday (somewhat randomly chosen).
    # Keep in sync with the Dependabot job in dependabot.yml!
    - cron: '30 02 * * 5'
  workflow_dispatch:

permissions: {}

jobs:
  maintenance:
    runs-on: ubuntu-latest
    name: Maintenance
    steps:
      - name: Checkout
        uses: actions/checkout@v7
        with:
          persist-credentials: false
          # I think that by default, pushes don't trigger other workflows, and
          # you need a separate token for that:
          # https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow
          token: ${{ secrets.GH_TOKEN }}
      - name: Set up ssh-agent
        uses: webfactory/ssh-agent@v0.10.0
        with:
          ssh-private-key: ${{ secrets.SSH_KEY }}
      - name: Set up Python
        uses: actions/setup-python@v7
        with:
          python-version-file: .python-version
      - name: Configure git
        run: |
          # See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
      - name: Run maintenance
        run: make maintenance