# Woodpecker CI for ZDDC. # # This pipeline only runs on `zddc-server-v*` tag pushes — it builds the # zddc-server runtime container image and publishes it to Codeberg's # container registry. Other tags (archive-v*, transmittal-v*, etc.) and # regular pushes are ignored here; the HTML tool releases happen by # pushing static files to the website (no image involved). # # To enable: in Codeberg → repo Settings → Woodpecker → set the secrets # codeberg_user = your Codeberg username (e.g. VARASYS) # codeberg_token = a personal token with package:write scope # Generate the token at https://codeberg.org/user/settings/applications. # # After setup, cut a release with: # git tag zddc-server-v0.0.1 # git push --tags # and the pipeline will publish: # codeberg.org/varasys/zddc-server:0.0.1 # codeberg.org/varasys/zddc-server:latest when: - event: tag ref: refs/tags/zddc-server-v* steps: prepare-bundle: image: docker.io/alpine:3.20 commands: # build.sh assembles zddc/dist/web/ from landing and archive # built outputs (which are committed force-tracked dist files). # Falls back gracefully when podman isn't present — we don't # need the cross-compiled binaries here, the runtime container # builds its own linux/amd64 binary internally. - sh build.sh # Image tag = the bare semver after the "zddc-server-v" prefix. # Plus a "latest" tag for convenience. - VERSION="${CI_COMMIT_TAG#zddc-server-v}" - printf '%s\nlatest\n' "$VERSION" > .image-tags - echo "Will tag image with: $(cat .image-tags | tr '\n' ' ')" publish-image: image: woodpeckerci/plugin-docker-buildx settings: registry: codeberg.org repo: codeberg.org/varasys/zddc-server dockerfile: zddc/Containerfile context: zddc target: server tags_file: .image-tags auto_tag: false username: from_secret: codeberg_user password: from_secret: codeberg_token