Add non-arm docker image build
Some checks failed
Build Docker Image / nix-flake-check (push) Failing after 2m42s
Build Docker Image / docker-build (push) Has been skipped
Build Docker Image / arm-docker-build (push) Has been skipped

This commit is contained in:
Gabriel Simmer 2023-07-19 08:50:58 +01:00
parent 01e9d4818b
commit 0a57b454cf
Signed by: arch
GPG key ID: C81B106D46C5B875

View file

@ -24,6 +24,32 @@ jobs:
- name: Check codebase - name: Check codebase
run: nix flake check -L run: nix flake check -L
docker-build:
needs: nix-flake-check
runs-on: debian-latest
steps:
- name: Install prerequisites
run: apt update && apt install -y sudo
- name: Install Nix
uses: https://github.com/cachix/install-nix-action@v22
with:
extra_nix_config: "experimental-features = nix-command flakes"
nix_path: nixpkgs=channel:nixos-23.05
- name: Remove access_tokens
run: sed -i '/^access-tokens/d' /etc/nix/nix.conf
- name: Check out repository
uses: https://github.com/RouxAntoine/checkout@v3.5.4
with:
ref: trunk
- name: Build image
run: nix build .#docker
- name: Push image with Skopeo
run: |
nix-env -i skopeo -f '<nixpkgs>'
wget https://raw.githubusercontent.com/containers/skopeo/main/default-policy.json && mkdir /etc/containers && mv default-policy.json /etc/containers/policy.json
skopeo copy docker-archive:result docker://icr.gmem.ca/dref:latest
arm-docker-build: arm-docker-build:
needs: nix-flake-check needs: nix-flake-check
runs-on: debian-latest-arm runs-on: debian-latest-arm