nixos-runner/.drone.yml
Jeffrey C. Ollie 938262d78f
All checks were successful
continuous-integration/drone/push Build is passing
update build and clean up
2023-08-29 08:54:46 -05:00

49 lines
1.5 KiB
YAML

---
kind: secret
name: docker_username
get:
path: docker
name: username
---
kind: secret
name: docker_password
get:
path: docker
name: password
---
kind: pipeline
type: kubernetes
name: publish
steps:
- name: build
image: docker.io/jcollie/nixos-runner:latest
pull: always
commands:
# - set
# - nix run .#login
# - echo -n "$${PLUGIN_PASSWORD}" | podman login --username $${PLUGIN_USERNAME} --password-stdin $${PLUGIN_REGISTRY}
- nix build .#nixos-runner
- nix run .#push-container -- result
# - podman load --input result | sed -n -e "s/Loaded image:.\\(.*\\)/\\1/p" > loaded-image
# - cat loaded-image
# - podman images
# - podman tag "$$(<loaded-image)" "$${PLUGIN_REGISTRY}/$${PLUGIN_REPOSITORY}:$${DRONE_BUILD_NUMBER}-$${DRONE_COMMIT_SHA:0:8}"
# - podman tag "$$(<loaded-image)" "$${PLUGIN_REGISTRY}/$${PLUGIN_REPOSITORY}:latest"
# - podman images
# - podman push "$${PLUGIN_REGISTRY}/$${PLUGIN_REPOSITORY}:$${DRONE_BUILD_NUMBER}-$${DRONE_COMMIT_SHA:0:8}"
# - podman push "$${PLUGIN_REGISTRY}/$${PLUGIN_REPOSITORY}:latest"
# - podman logout "$${PLUGIN_REGISTRY}"
# env:
# REGISTRY: docker.io
# REPOSITORY: jcollie/nixos-runner
# USERNAME:
# from_secret: docker_username
# PASSWORD:
# from_secret: docker_password
settings:
registry: docker.io
repository: jcollie/nixos-runner
username:
from_secret: docker_username
password:
from_secret: docker_password