summaryrefslogtreecommitdiff
path: root/.github/actions/flake-update/action.yaml
blob: ac3e3b7a1a512fd0b2e31125058daae453ebcc1b (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
name: "update flake inputs"
description: "wrapper around DeterminateSystems/update-flake-lock"
inputs:
  commit-msg:
    required: true
  github-token:
    description: "github read token for increasing rate limits"
    required: true
    default: ""
  inputs:
    description: "flake inputs to update"
    required: false
    default: ""
runs:
  using: "composite"
  steps:
    - name: install nix
      uses: cachix/install-nix-action@v22
      with:
        github_access_token: ${{ inputs.github-token }}

    - name: run update-flake-lock
      uses: DeterminateSystems/update-flake-lock@v19
      id: update
      with:
        commit-msg: ${{ inputs.commit-msg }}
        inputs: ${{ inputs.inputs }}
        pr-title: ${{ inputs.commit-msg }}
        token: ${{ inputs.github-token }}

    - name: auto-merge pull request
      shell: bash
      run: gh pr merge --auto --rebase "$PR_ID"
      env:
        GITHUB_TOKEN: ${{ inputs.github-token }}
        PR_ID: ${{ steps.update.outputs.pull-request-number }}