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 }} access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock - name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@vX 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) ## Example updating specific input(s)

View File

@ -9,6 +9,18 @@ inputs:
description: 'GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT)' description: 'GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT)'
required: false required: false
default: ${{ github.token }} 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: runs:
using: "composite" using: "composite"
steps: steps:
@ -18,9 +30,9 @@ runs:
for input in ${{ inputs.inputs }}; do for input in ${{ inputs.inputs }}; do
inputs+=("--update-input" "$input") inputs+=("--update-input" "$input")
done done
nix flake lock "${inputs[@]}" --commit-lock-file nix flake lock "${inputs[@]}" --commit-lock-file --commit-lockfile-summary "${{ inputs.commit-msg }}"
else else
nix flake update --commit-lock-file nix flake update --commit-lock-file --commit-lockfile-summary "${{ inputs.commit-msg }}"
fi fi
shell: bash shell: bash
env: env:
@ -41,8 +53,9 @@ runs:
with: with:
branch: update_flake_lock_action branch: update_flake_lock_action
delete-branch: true delete-branch: true
title: "flake.lock: Update" title: ${{ inputs.pr-title }}
token: ${{ inputs.token }} token: ${{ inputs.token }}
labels: ${{ inputs.pr-labels }}
body: | body: |
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action. Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action.