dref/.gitea/workflows/build-docker.yml
Gabriel Simmer 58cfce0eb6
All checks were successful
Build Docker Image / arm-docker-build (push) Successful in 5m29s
Grab policy.json
2023-07-18 07:44:53 +01:00

31 lines
1 KiB
YAML

name: Build Docker Image
on:
push:
branches:
- trunk
jobs:
arm-docker-build:
runs-on: debian-latest-arm
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:arm