File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33make setup-synocommunity
44sed -i -e " s|#PARALLEL_MAKE=.*|PARALLEL_MAKE=4|" \
5- -e " s|PUBLISH_API_KEY=.*|PUBLISH_API_KEY= $API_KEY |" \
5+ -e " s|PUBLISH_API_KEY =.*|PUBLISH_API_KEY = $API_KEY |" \
66 local.mk
77
88# PACKAGE=$(echo "refs/tags/dnscrypt-proxy-2.0.42" | grep -oE "([0-9a-zA-Z]*-)*")
@@ -12,3 +12,8 @@ echo "$GH_PACKAGE"
1212
1313# use TCVERSION and ARCH parameters to get real exit code.
1414make TCVERSION=${GH_ARCH##* -} ARCH=${GH_ARCH%% -* } -C spk/${GH_PACKAGE}
15+
16+ # publish to synocommunity.com when the API key is set
17+ if [ -n " ${API_KEY} " ]; then
18+ make TCVERSION=${GH_ARCH##* -} ARCH=${GH_ARCH%% -* } publish -C spk/${GH_PACKAGE}
19+ fi
Original file line number Diff line number Diff line change 8282 env :
8383 # https://github.com/SynoCommunity/spksrc/wiki/Compile-and-build-rules
8484 GH_ARCH : ${{ matrix.arch }}
85- # API_KEY: ${{ secrets.PUBLISH_API_KEY }}
85+ API_KEY : ${{ secrets.PUBLISH_API_KEY }}
8686 BUILD_ERROR_FILE : /github/workspace/build_errors.txt
8787 BUILD_UNSUPPORTED_FILE : /github/workspace/build_unsupported.txt
8888 BUILD_SUCCESS_FILE : /github/workspace/build_success.txt
Original file line number Diff line number Diff line change @@ -169,10 +169,10 @@ dsm-%: local.mk
169169 @grep -q " ^DEFAULT_TC.*=.*$* .*" local.mk || sed -i " /^DEFAULT_TC =/s/$$ / $* /" local.mk
170170
171171setup-synocommunity : setup
172- @sed -i -e " s|PUBLISH_URL=.*|PUBLISH_URL= https://api.synocommunity.com|" \
173- -e " s|MAINTAINER?=.*|MAINTAINER?= SynoCommunity|" \
174- -e " s|MAINTAINER_URL?=.*|MAINTAINER_URL?= https://synocommunity.com|" \
175- -e " s|DISTRIBUTOR=.*|DISTRIBUTOR= SynoCommunity|" \
176- -e " s|DISTRIBUTOR_URL=.*|DISTRIBUTOR_URL= https://synocommunity.com|" \
177- -e " s|REPORT_URL=.*|REPORT_URL= https://github.com/SynoCommunity/spksrc/issues|" \
172+ @sed -i -e " s|PUBLISH_URL =.*|PUBLISH_URL = https://api.synocommunity.com|" \
173+ -e " s|MAINTAINER ?=.*|MAINTAINER ?= SynoCommunity|" \
174+ -e " s|MAINTAINER_URL ?=.*|MAINTAINER_URL ?= https://synocommunity.com|" \
175+ -e " s|DISTRIBUTOR =.*|DISTRIBUTOR = SynoCommunity|" \
176+ -e " s|DISTRIBUTOR_URL =.*|DISTRIBUTOR_URL = https://synocommunity.com|" \
177+ -e " s|REPORT_URL =.*|REPORT_URL = https://github.com/SynoCommunity/spksrc/issues|" \
178178 local.mk
Original file line number Diff line number Diff line change @@ -375,7 +375,7 @@ endif
375375ifeq ($(PUBLISH_API_KEY ) ,)
376376 $(error Set PUBLISH_API_KEY in local.mk)
377377endif
378- http --verify=no --auth $(PUBLISH_API_KEY): POST $(PUBLISH_URL)/packages @$(SPK_FILE_NAME)
378+ http --verify=no --ignore-stdin -- auth $(PUBLISH_API_KEY): POST $(PUBLISH_URL)/packages @$(SPK_FILE_NAME)
379379
380380
381381# ## Clean rules
You can’t perform that action at this time.
0 commit comments