aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/maintenance.yml
blob: 1d2201c835d3ac3b532bd990d6a62f2df3a14ffd (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
name: Maintenance

on:
  # As of April '26, this won't run until this is the default branch.
  # workflow_dispatch doesn't work neither.
  schedule:
    # Weekly, at 02:30 UTC on Friday (somewhat randomly chosen).
    - cron: '30 02 * * 5'
  workflow_dispatch:

jobs:
  maintenance:
    runs-on: ubuntu-latest
    name: Maintenance
    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          # I think that by default, pushes don't trigger other workflows, and
          # you need a separate token for that: https://github.com/orgs/community/discussions/37103
          token: '${{ secrets.GH_TOKEN }}'
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
      - name: Run maintenance
        id: maintenance
        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"

          make maintenance