Publish builds over HTTP (/build/upload + /build/publish)
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2026-08-05 20:31:50 +02:00
parent a50d8dc6d8
commit 60f13f442b
2 changed files with 10 additions and 17 deletions
+4 -7
View File
@@ -13,14 +13,11 @@ steps:
- name: artifact - name: artifact
image: alpine image: alpine
environment: environment:
DROPAREA_HOST: vps.teletype.hu UPDATE_SERVER: https://teletypegames.org
DROPAREA_PORT: 2223 UPDATE_SECRET:
DROPAREA_TARGET_PATH: /home/drop from_secret: update_secret_key
DROPAREA_USER: drop
DROPAREA_SSH_PASSWORD:
from_secret: droparea_ssh_password
commands: commands:
- 'apk add --no-cache make openssh-client sshpass' - 'apk add --no-cache make curl'
- 'make ci-artifact' - 'make ci-artifact'
- name: update - name: update
+6 -10
View File
@@ -16,10 +16,6 @@ UNAME_S := $(shell uname -s)
# CI/CD variables # CI/CD variables
VERSION_FILE = .version VERSION_FILE = .version
DROPAREA_HOST ?= vps.teletype.hu
DROPAREA_PORT ?= 2223
DROPAREA_TARGET_PATH ?= /home/drop
DROPAREA_USER ?= drop
UPDATE_SERVER ?= https://teletypegames.org UPDATE_SERVER ?= https://teletypegames.org
all: build all: build
@@ -77,15 +73,15 @@ ci-build: build
ci-artifact: ci-artifact:
@VERSION=$$(cat $(VERSION_FILE)); \ @VERSION=$$(cat $(VERSION_FILE)); \
echo "==> Uploading artifacts for version $$VERSION"; \ echo "==> Uploading artifacts for version $$VERSION"; \
SCP_TARGET="$(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/"; \ for f in $(PROJECT)-$$VERSION.prg $(PROJECT)-$$VERSION.metadata.json; do \
sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) \ curl -fsS -H "X-Update-Secret: $(UPDATE_SECRET)" \
$(PROJECT)-$$VERSION.prg \ -F "file=@$$f" \
$(PROJECT)-$$VERSION.metadata.json \ "$(UPDATE_SERVER)/build/upload?name=$(PROJECT)&version=$$VERSION" || exit 1; \
$$SCP_TARGET done
ci-update: ci-update:
@VERSION=$$(cat $(VERSION_FILE)); \ @VERSION=$$(cat $(VERSION_FILE)); \
echo "==> Triggering update for version $$VERSION"; \ echo "==> Triggering update for version $$VERSION"; \
curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=c64&version=$$VERSION" curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=c64&version=$$VERSION"
.PHONY: all deps build run clear rebuild rebuildrun ci-version ci-build ci-artifact ci-update .PHONY: all deps build run clear rebuild rebuildrun ci-version ci-build ci-artifact ci-update