File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,21 @@ description: "Check if a git repository has uncommitted changes"
33branding :
44 icon : " info"
55 color : " yellow"
6+ inputs :
7+ status-args :
8+ description : " Arguments to the `git status` command."
9+ required : false
10+ default : " "
11+ pathspec :
12+ description : " Pattern used to limit paths in the `git status` command."
13+ required : false
14+ default : " "
615outputs :
716 changed :
8- description : " Whether or not there are uncommitted changes in the folder "
17+ description : " Whether or not there are uncommitted changes in the pathspec "
918runs :
1019 using : " docker"
1120 image : " Dockerfile"
21+ args :
22+ - ${{ inputs.status-args }}
23+ - ${{ inputs.pathspec }}
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4+ STATUS_ARGS=$1
5+ PATHSPEC=$2
6+
47function check() {
5- if [[ -z " $( git status --porcelain) " ]];
8+ if [[ -z " $( git status --porcelain $STATUS_ARGS $PATHSPEC ) " ]];
69 then
710 echo " 0"
811 else
You can’t perform that action at this time.
0 commit comments