vrnp/.gitea/workflows/build-container.yml
Paul Brinkmeier 6bab8ac3a9
Some checks failed
Build image / build-image (push) Failing after 2m48s
fixup! fixup! Add version file for crane push
2025-04-23 13:36:43 +02:00

31 lines
1022 B
YAML

name: Build image
on: [push]
jobs:
build-image:
runs-on: ubuntu-22.04
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)
- name: Install crane
run: |
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.20.3/go-containerregistry_Linux_x86_64.tar.gz" > go-containerregistry.tar.gz
tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane
- run: echo $(cat image-name)
- run: tar tvf image.tar.gz
- run: echo $(readlink -f image.tar.gz)
- run: crane push $(readlink -f image.tar.gz) $(cat image-name)