File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ ENV SECRET_KEY=$SECRET_KEY
66VOLUME /repo
77WORKDIR /repo
88
9- RUN apk add --update --no-cache bash git git-crypt jq
9+ RUN apk add --update --no-cache bash git git-crypt
1010COPY pipe.sh /
1111
1212ENTRYPOINT ["/pipe.sh" ]
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- cat package.json | jq .version
4-
53# Check for the presence of the SECRETS_KEY environment variable
64if [ -z " $SECRETS_KEY " ]; then
75 echo " SECRETS_KEY environment variable is missing."
@@ -15,6 +13,7 @@ git config --global --add safe.directory ${PWD}
1513if [ $GIT_STASH = " true" ]; then
1614 echo " Stashing changes"
1715 git stash
16+
1817fi
1918
2019echo " $SECRETS_KEY " | base64 -d > /tmp/secrets.key
@@ -24,7 +23,7 @@ git-crypt unlock /tmp/secrets.key
2423rm -f /tmp/secrets.key
2524echo " Decrypted git-crypt files"
2625
27- if [ $GIT_STASH = " true" ]; then
28- echo " Applying stash "
29- git stash apply
30- fi
26+ if [ " $GIT_STASH " = " true" ] && [ " $( git stash list | wc -l ) " -gt 0 ]; then
27+ echo " Applying stashed changes "
28+ git stash pop
29+ fi
You can’t perform that action at this time.
0 commit comments