File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Container image that runs your code
2- FROM optnc/yamlfixer:0.3.9
2+ FROM optnc/yamlfixer:0.4.7
33
44# Copies your code file from your action repository to the filesystem path `/` of the container
55COPY entrypoint.sh /entrypoint.sh
@@ -9,6 +9,7 @@ RUN chmod +x /entrypoint.sh
99RUN apk update
1010RUN apk add git
1111RUN apk add curl
12+ RUN apk add jq
1213
1314# Code file to execute when the docker container starts up (`entrypoint.sh`)
1415ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 11#! /bin/sh -l
22
3- yamlfixer $OPTIONS /github/workspace/$YAML_FILE
3+ CHANGES= $( yamlfixer --nochange --jsonsummary /github/workspace/$YAML_FILE 2>&1 | jq ' [.fixed,.modified] | add ' )
44
5- result= $?
6- if [ $result -ne 0 ] ; then
5+ if [ $CHANGES -gt 0 ] ; then
6+ yamlfixer $OPTIONS /github/workspace/ $YAML_FILE
77 echo " WARN: all input files didn't pass successfully yamllint strict mode." ;
88 echo " INFO : create a new branch with corrections." ;
99 cd /github/workspace
You can’t perform that action at this time.
0 commit comments