vrnp/.gitea/workflows/build-container.yml
Paul Brinkmeier 309266e8e7
Some checks failed
Build image / build-image (push) Failing after 3m35s
Add docker commands
2025-04-23 14:23:36 +02:00

26 lines
813 B
YAML

name: Build image
on: [push]
jobs:
build-image:
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- run: ls -l
- run: apt-get update && apt-get install -y sudo
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
enable_kvm: false
- name: Build image
run: nix build .#image -o image.tar.gz
- name: Get image name
run: nix build .#image-name -o image-name
- run: ls -l
- run: ls -l $(readlink -f image.tar.gz)
- run: docker load < image.tar.gz
- run: docker image ls
- run: docker login --username "$REGISTRY_USERNAME" --password "$REGISTRY_PASSWORD" git.pbrinkmeier.de
- run: docker image push $(cat image-name)