matrix: PLATFORM: - 'linux/amd64' - 'linux/arm64' platform: ${PLATFORM} pipeline: build-lander: image: 'alpine:edge' commands: - apk add --no-cache build-base make - make CFLAGS='-O3' LDFLAGS='-flto -static' - strip -s build/lander - du -h build/lander - '[ "$(readelf -d build/lander | grep NEEDED | wc -l)" = 0 ]' build-landerctl: image: 'alpine:3.18.0' commands: - > apk add --no-cache build-base git make curl-static curl-dev file-dev libmagic-static openssl-libs-static openssl-dev libidn2-static libidn2-dev nghttp2-static nghttp2-dev libunistring-static libunistring-dev brotli-static brotli-dev zlib-static zlib-dev - make -C landerctl CFLAGS='-O3' LDFLAGS='-flto -static' LIBS='magic curl ssl nghttp2 crypto idn2 unistring brotlidec brotlienc brotlicommon z' - strip -s landerctl/build/landerctl - du -h landerctl/build/landerctl - '[ "$(readelf -d landerctl/build/landerctl | grep NEEDED | wc -l)" = 0 ]' publish-dev: image: 'alpine:3.18.0' group: publish commands: - apk add --no-cache minio-client - mcli alias set rb 'https://s3.rustybever.be' "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY" - mcli cp build/lander "rb/lander/commits/$CI_COMMIT_SHA/lander-$(echo '${PLATFORM}' | sed 's:/:-:g')" - mcli cp landerctl/build/landerctl "rb/lander/commits/$CI_COMMIT_SHA/landerctl-$(echo '${PLATFORM}' | sed 's:/:-:g')" secrets: - minio_access_key - minio_secret_key when: branch: dev event: push publish-rel: image: 'curlimages/curl' group: publish commands: - > curl -s --fail --user "Chewing_Bever:$GITEA_PASSWORD" --upload-file build/lander https://git.rustybever.be/api/packages/Chewing_Bever/generic/lander/"${CI_COMMIT_TAG}"/lander-"$(echo '${PLATFORM}' | sed 's:/:-:g')" - > curl -s --fail --user "Chewing_Bever:$GITEA_PASSWORD" --upload-file landerctl/build/landerctl https://git.rustybever.be/api/packages/Chewing_Bever/generic/lander/"${CI_COMMIT_TAG}"/landerctl-"$(echo '${PLATFORM}' | sed 's:/:-:g')" secrets: - gitea_password when: event: tag