File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ inputs:
1717 description : ' Overwrite existing repo-properties.yaml with read values'
1818 default : false
1919 required : false
20+ commit-changes :
21+ description : ' Commit values read to the repo'
22+ default : false
23+ required : false
2024
2125runs :
2226 using : " composite"
2832 sudo wget --quiet https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
2933 sudo chmod +x /usr/bin/yq
3034 yq --version # confirm installed
31-
32-
3335
3436 - name : List all repos in org
3537 shell : bash
@@ -130,9 +132,20 @@ runs:
130132 cat read-repo-properties.yaml
131133
132134 - name : Overwrite existing file (if applicable)
133- if : inputs.overwrite-existing-file == true
135+ if : ${{ inputs.overwrite-existing-file == true }}
134136 shell : bash
135137 run : |
136138 echo "Overwriting existing repo-properties.yaml"
137139 mv read-repo-properties.yaml repo-properties.yaml
138140
141+ - name : Commit values read to repo-properties.yaml
142+ if : ${{ inputs.commit-changes == true }}
143+ shell : bash
144+ uses : EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
145+ with :
146+ cwd : " ."
147+ author_name : ${{ secrets.SVCS_GIT_USER_NAME }}
148+ author_email : ${{ secrets.SVCS_GIT_USER_EMAIL }}
149+ commit : --signoff
150+ message : " chore: commit repo custom properties to properties file"
151+
You can’t perform that action at this time.
0 commit comments