Reproduce

Environment Variables

NixCI automatically sets these environment variables during test and deploy jobs. You may need to set them manually when reproducing locally:

export CI=true
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export NIX_CI_GIT_BRANCH=master
export NIX_CI_GIT_COMMIT_SHA=7babf9d9394ef4b5234ec23ebc3d2f4c3baf49b6
export NIX_CI_GIT_REF=refs/heads/master
export TERM=xterm-256color

Secrets

You will need to set these environment variables to the appropriate secrets:

  • FLY_API_TOKEN

Exactly

mkdir /tmp/repo
cd /tmp/repo
git init --quiet
git remote add --end-of-options origin ssh://git@codeberg.org/mtlynch/go-app-starter
git fetch --depth=1 --end-of-options origin 7babf9d9394ef4b5234ec23ebc3d2f4c3baf49b6
git -c advice.detachedHead=false checkout --end-of-options 7babf9d9394ef4b5234ec23ebc3d2f4c3baf49b6
nix \
    --extra-experimental-features nix-command \
    --extra-experimental-features flakes \
    --log-format raw-with-logs \
    run .#packages.x86_64-linux.deploy-to-fly \
    --print-build-logs

Locally

Must be run from repository root directory at commit 7babf9d9

nix \
    --extra-experimental-features nix-command \
    --extra-experimental-features flakes \
    --log-format raw-with-logs \
    run .#packages.x86_64-linux.deploy-to-fly \
    --print-build-logs

Feedback Loop

Must be run from repository root directory at commit 7babf9d9

nix run github:NorfairKing/feedback -- -- nix \
    --extra-experimental-features nix-command \
    --extra-experimental-features flakes \
    --log-format raw-with-logs \
    run .#packages.x86_64-linux.deploy-to-fly \
    --print-build-logs

Limitations