update workflows
All checks were successful
build nixos-runner / build (push) Successful in 22m26s

This commit is contained in:
Jeffrey C. Ollie 2024-09-08 00:23:15 -05:00
parent 2c005c9333
commit 2062ace72b
Signed by: jeff
GPG key ID: 6F86035A6D97044E
2 changed files with 6 additions and 50 deletions

View file

@ -1,49 +0,0 @@
---
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

View file

@ -6,7 +6,6 @@ jobs:
runs-on: nixos runs-on: nixos
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: set
- run: nix build -L .#nixos-runner - run: nix build -L .#nixos-runner
- run: nix run .#push-container -- result - run: nix run .#push-container -- result
env: env:
@ -14,3 +13,9 @@ jobs:
REPOSITORY: ${{ github.repository_owner }}/nixos-runner REPOSITORY: ${{ github.repository_owner }}/nixos-runner
USERNAME: ${{ github.actor }} USERNAME: ${{ github.actor }}
PASSWORD: ${{ github.token }} PASSWORD: ${{ github.token }}
- run: nix run .#push-container -- result
env:
REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
REPOSITORY: ${{ secrets.DOCKER_USERNAME }}/nixos-runner
USERNAME: ${{ secrets.DOCKER_USERNAME }}
PASSWORD: ${{ secrets.DOCKER_PASSWORD }}