Return of honkbot, in Rust. Hopefully it won't die all the time.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci: switch to nixery engine, fix secrets syntax

goose.art 8356f6ce 92c21759

+58 -30
+58
.tangled/workflows/build.yaml
··· 1 + when: 2 + - event: ["push"] 3 + branch: ["main"] 4 + 5 + engine: "nixery" 6 + 7 + dependencies: 8 + nixpkgs: 9 + - rustc 10 + - cargo 11 + - gcc 12 + - pkg-config 13 + - openssl 14 + - cacert 15 + - buildah 16 + - fuse-overlayfs 17 + 18 + environment: 19 + APP_PASSWORD: "${{ secrets.APP_PASSWORD }}" 20 + IMAGE_REGISTRY: "atcr.io" 21 + IMAGE_USER: "goose.art" 22 + IMAGE_NAME: "honkbot" 23 + 24 + steps: 25 + - name: "build rust binary" 26 + command: | 27 + cargo build --release 28 + 29 + - name: "build and push container image" 30 + command: | 31 + export REGISTRY_AUTH_FILE=/tmp/auth.json 32 + 33 + echo "${APP_PASSWORD}" | buildah login \ 34 + -u "${IMAGE_USER}" \ 35 + --password-stdin \ 36 + ${IMAGE_REGISTRY} 37 + 38 + # Create container from slim debian base 39 + ctr=$(buildah from docker.io/debian:bookworm-slim) 40 + 41 + # Install ca-certificates 42 + buildah run $ctr -- apt-get update 43 + buildah run $ctr -- apt-get install -y --no-install-recommends ca-certificates 44 + buildah run $ctr -- rm -rf /var/lib/apt/lists/* 45 + 46 + # Copy in our binary and fallback images 47 + buildah copy $ctr target/release/honkbot /usr/local/bin/honkbot 48 + buildah copy $ctr fallback_images/ /app/fallback_images/ 49 + 50 + # Configure 51 + buildah config --workingdir /app $ctr 52 + buildah config --env FALLBACK_IMAGE_DIR=/app/fallback_images $ctr 53 + buildah config --env RUST_LOG=info $ctr 54 + buildah config --entrypoint '["honkbot"]' $ctr 55 + 56 + # Commit and push 57 + buildah commit $ctr ${IMAGE_REGISTRY}/${IMAGE_USER}/${IMAGE_NAME}:latest 58 + buildah push ${IMAGE_REGISTRY}/${IMAGE_USER}/${IMAGE_NAME}:latest
-30
.tangled/workflows/build.yml
··· 1 - when: 2 - - event: ["push"] 3 - branch: ["main"] 4 - 5 - engine: kubernetes 6 - image: quay.io/buildah/stable:latest 7 - architecture: amd64 8 - 9 - environment: 10 - IMAGE_REGISTRY: atcr.io 11 - IMAGE_USER: goose.art 12 - 13 - steps: 14 - - name: Login to ATCR 15 - command: | 16 - echo "${APP_PASSWORD}" | buildah login \ 17 - -u "${IMAGE_USER}" \ 18 - --password-stdin \ 19 - ${IMAGE_REGISTRY} 20 - 21 - - name: Build and push image 22 - command: | 23 - buildah bud \ 24 - --tag ${IMAGE_REGISTRY}/${IMAGE_USER}/honkbot:${TANGLED_REF_NAME} \ 25 - --tag ${IMAGE_REGISTRY}/${IMAGE_USER}/honkbot:latest \ 26 - --file ./Dockerfile \ 27 - . 28 - 29 - buildah push ${IMAGE_REGISTRY}/${IMAGE_USER}/honkbot:${TANGLED_REF_NAME} 30 - buildah push ${IMAGE_REGISTRY}/${IMAGE_USER}/honkbot:latest