99set -o pipefail
1010
1111THISREPO=$( git rev-parse --show-toplevel)
12- TEMPLATES=" ${THISREPO} /../depot/github-actions"
12+ TEMPLATES=" ${THISREPO} /../depot/github-actions/.github "
1313
1414if [ $# -ge 1 ] ; then
1515 WORKFLOWS=$*
1616else
1717 # Scan to see which templates are installed, and update them.
1818 for WF in " ${THISREPO} " /.github/workflows/* .yaml ; do
1919 BASE=$( basename " ${WF} " )
20- if [ -f " ${TEMPLATES} /${BASE} " ] ; then
20+ if [ -f " ${TEMPLATES} /workflows/ ${BASE} " ] ; then
2121 WORKFLOWS=" ${WORKFLOWS} ${BASE} "
2222 fi
2323 done
@@ -53,9 +53,9 @@ for WF in ${WORKFLOWS} ; do
5353 echo " "
5454 if [ -f " ${THISREPO} /${YAMLPATCH} " ] ; then
5555 yaml2json < " ${THISREPO} /${YAMLPATCH} " > " ${JSONPATCH} "
56- yaml2json < " ${TEMPLATES} /${WF} " | jsonpatch - " ${JSONPATCH} " | json2yaml
56+ yaml2json < " ${TEMPLATES} /workflows/ ${WF} " | jsonpatch - " ${JSONPATCH} " | json2yaml
5757 else
58- yaml2json < " ${TEMPLATES} /${WF} " | json2yaml
58+ yaml2json < " ${TEMPLATES} /workflows/ ${WF} " | json2yaml
5959 fi
6060 ) > " ${THISREPO} /.github/workflows/${WF} "
6161
@@ -69,7 +69,7 @@ for WF in ${WORKFLOWS} ; do
6969
7070 # If there's an example patch file in depot, but none in this repo, copy it over.
7171 # If you add an example patch file that's really optional, you'll need to change this logic.
72- SRCPATCH=" ${TEMPLATES} /examples/ ${BASE} -patch.yaml"
72+ SRCPATCH=" ${TEMPLATES} /${BASE} -patch.yaml"
7373 DSTPATCH=" ${THISREPO} /.github/${BASE} -patch.yaml"
7474 if [ -f " ${SRCPATCH} " ] && ! [ -f " ${DSTPATCH} " ] ; then
7575 echo " "
0 commit comments