dref/.gitea/workflows/build-docker.yml

30 lines
892 B
YAML
Raw Normal View History

2023-07-16 10:49:16 +01:00
name: Build Docker Image
on:
push:
branches:
- trunk
jobs:
arm-docker-build:
2023-07-17 22:23:23 +01:00
runs-on: debian-latest-arm
2023-07-16 10:49:16 +01:00
steps:
2023-07-17 22:26:40 +01:00
- name: Install prerequisites
run: apt update && apt install -y sudo
2023-07-17 22:23:23 +01:00
- name: Install Nix
2023-07-17 22:24:04 +01:00
uses: https://github.com/cachix/install-nix-action@v22
2023-07-17 22:41:36 +01:00
with:
extra_nix_config: "experimental-features = nix-command flakes"
2023-07-18 07:28:18 +01:00
nix_path: nixpkgs=channel:nixos-23.05
2023-07-17 22:48:28 +01:00
- name: Remove access_tokens
run: sed -i '/^access-tokens/d' /etc/nix/nix.conf
2023-07-16 10:49:16 +01:00
- name: Check out repository
uses: https://github.com/RouxAntoine/checkout@v3.5.4
with:
ref: trunk
2023-07-17 22:23:23 +01:00
- name: Build image
run: nix build .#docker
- name: Push image with Skopeo
2023-07-18 07:20:33 +01:00
run: |
nix-env -i skopeo -f '<nixpkgs>'
2023-07-18 07:35:40 +01:00
skopeo copy docker-archive:result docker://icr.gmem.ca/dref:arm