aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/deps.yml
blob: b1ba83bf0edc09ae49a871ca8fa4de8364c326fa (plain)
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
40
41
42
43
44
name: Dependencies

on:
  schedule:
    - cron: '0 0 * * 0'
  workflow_dispatch:

permissions:
  pull-requests: write
  contents: write

jobs:
  update:
    name: Update
    runs-on: ubuntu-latest
    permissions:
      actions: write
      contents: write
      pull-requests: write
    steps:
      - uses: actions/checkout@v4

      - uses: DeterminateSystems/nix-installer-action@v12

      - run: nix -vL run --show-trace .#update

      - id: create-pr
        uses: peter-evans/create-pull-request@v6
        with:
          branch: update_zmk_config_deps
          delete-branch: true
          committer: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
          author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
          commit-message: 'config,nix: update deps'
          title: 'config,nix: update deps'
          labels: 'dependencies'
          body: |
            Automated bump of ZMK dependencies

      - uses: benc-uk/workflow-dispatch@v1
        if: ${{ contains(fromJSON('["created", "updated"]'), steps.create-pr.outputs.pull-request-operation) }}
        with:
          workflow: ci.yml
          ref: refs/heads/update_zmk_config_deps