diff options
| author | seth <[email protected]> | 2023-09-06 17:52:38 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-09-07 13:52:26 -0400 |
| commit | a3417fada3c603ef5b3e0820d695b684661fb4d5 (patch) | |
| tree | 9936fa78ebd0323dfc9cb255618bc78defb57422 /.github/workflows/update-lock.yaml | |
| parent | e41f98de313f81a74a6ebb1131b3bd92817c4acb (diff) | |
actions: make flake-update a reusable workflow
Diffstat (limited to '.github/workflows/update-lock.yaml')
| -rw-r--r-- | .github/workflows/update-lock.yaml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/update-lock.yaml b/.github/workflows/update-lock.yaml new file mode 100644 index 0000000..0bf8b1d --- /dev/null +++ b/.github/workflows/update-lock.yaml @@ -0,0 +1,37 @@ +name: update flake lock + +on: + workflow_call: + inputs: + commit-msg: + description: summary for lockfile commit + required: true + type: string + inputs: + description: flake inputs to update + required: false + default: "" + type: string + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + + - name: update lockfile + uses: DeterminateSystems/update-flake-lock@v20 + id: update + with: + commit-msg: ${{ inputs.commit-msg }} + inputs: ${{ inputs.inputs }} + pr-title: ${{ inputs.commit-msg }} + token: ${{ github.token }} + + - name: enable auto-merge + shell: bash + run: gh pr merge --auto --rebase "$PR_ID" + env: + GITHUB_TOKEN: ${{ github.token }} + PR_ID: ${{ steps.update.outputs.pull-request-number }} |
