fix drone build
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing

This commit is contained in:
Jeffrey C. Ollie 2023-08-17 13:18:21 -05:00
parent 54a46488f6
commit 14d5105439
Signed by: jeff
GPG key ID: 6F86035A6D97044E

View file

@ -20,18 +20,18 @@ steps:
pull: always pull: always
commands: commands:
- set - set
- echo -n "${PASSWORD}" | podman login --username ${USERNAME} --password-stdin ${REGISTRY} - echo -n "${PLUGIN_PASSWORD}" | podman login --username ${PLUGIN_USERNAME} --password-stdin ${PLUGIN_REGISTRY}
- nix build .#nixos-runner - nix build .#nixos-runner
# - nix run .#push-container -- result # - nix run .#push-container -- result
- podman load --input result | sed -n -e "s/Loaded image:.\\(.*\\)/\\1/p" > loaded-image - podman load --input result | sed -n -e "s/Loaded image:.\\(.*\\)/\\1/p" > loaded-image
- cat loaded-image - cat loaded-image
- podman images - podman images
- podman tag "$(<loaded-image)" "${REGISTRY}/${REPOSITORY}:${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:8}" - podman tag "$(<loaded-image)" "${PLUGIN_REGISTRY}/${PLUGIN_REPOSITORY}:${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:8}"
- podman tag "$(<loaded-image)" "${REGISTRY}/${REPOSITORY}:latest" - podman tag "$(<loaded-image)" "${PLUGIN_REGISTRY}/${PLUGIN_REPOSITORY}:latest"
- podman images - podman images
- podman push "${REGISTRY}/${REPOSITORY}:${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:8}" - podman push "${PLUGIN_REGISTRY}/${PLUGIN_REPOSITORY}:${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:8}"
- podman push "${REGISTRY}/${REPOSITORY}:latest" - podman push "${PLUGIN_REGISTRY}/${PLUGIN_REPOSITORY}:latest"
- podman logout "${REGISTRY}" - podman logout "${PLUGIN_REGISTRY}"
settings: settings:
registry: docker.io registry: docker.io
repository: jcollie/nixos-runner repository: jcollie/nixos-runner