5 Commits
v7 ... v8

Author SHA1 Message Date
e00d99112b fix: Re-introduce inputs.pr-title
This is to allow users to override the PR title since the commit message as well as title are processed differently which may lead to errors in how they are displayed. For example, the commit message needs quotations to be escaped
2022-02-01 10:43:22 -08:00
aa902c3538 fix: Support Custom Commit Message 2022-02-01 10:43:22 -08:00
V7
8c2dfef874 docs: Add information about Cosmetic Changes 2022-02-01 10:43:22 -08:00
V7
e8bb9f761a feat(cosmetic): Add Support for setting PR Labels 2022-02-01 10:43:22 -08:00
V7
073d38a53e feat(cosmetic): Add Support for Custom PR Title 2022-02-01 10:43:22 -08:00
2 changed files with 21 additions and 3 deletions

View File

@ -28,6 +28,11 @@ jobs:
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@vX
with:
pr-title: "Update flake.lock" # Title of PR to be created
pr-labels: | # Labels to be set on the PR
dependencies
automated
```
## Example updating specific input(s)

View File

@ -9,6 +9,18 @@ inputs:
description: 'GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT)'
required: false
default: ${{ github.token }}
commit-msg:
description: 'The message provided with the commit'
required: false
default: "flake.lock: Update"
pr-title:
description: 'The title of the PR to be created'
required: false
default: "flake.lock: Update"
pr-labels:
description: 'A comma or newline separated list of labels to set on the Pull Request to be created'
required: false
default: ''
runs:
using: "composite"
steps:
@ -18,9 +30,9 @@ runs:
for input in ${{ inputs.inputs }}; do
inputs+=("--update-input" "$input")
done
nix flake lock "${inputs[@]}" --commit-lock-file
nix flake lock "${inputs[@]}" --commit-lock-file --commit-lockfile-summary "${{ inputs.commit-msg }}"
else
nix flake update --commit-lock-file
nix flake update --commit-lock-file --commit-lockfile-summary "${{ inputs.commit-msg }}"
fi
shell: bash
env:
@ -41,8 +53,9 @@ runs:
with:
branch: update_flake_lock_action
delete-branch: true
title: "flake.lock: Update"
title: ${{ inputs.pr-title }}
token: ${{ inputs.token }}
labels: ${{ inputs.pr-labels }}
body: |
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.