Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonasOnatsu committed Dec 13, 2024
1 parent 52dc697 commit 4ce8160
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .github/actions/build-action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
# Container image that runs your code
FROM ubuntu:22.04

ARG USER=builder

ENV TZ=Europe/Helsinki
ENV LANG=en_US.utf8

RUN apt-get update && apt-get -y install curl xz-utils git

# Install nixos
RUN groupadd nix
RUN useradd -m -d /home/${USER} -s /bin/bash -G nix ${USER}

# Install nix
COPY ./installer.conf /tmp/installer.conf
#COPY install_nix.sh /install_nix.sh
#RUN /install_nix.sh
Expand All @@ -23,6 +28,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/
RUN rm -f /tmp/installer.conf
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"

USER ${USER}

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

Expand Down
2 changes: 2 additions & 0 deletions .github/actions/build-action/installer.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
trusted-users = root @nix
allowed-users = root @nix
extra-system-features = kvm
sandbox = false
show-trace = true
Expand Down
35 changes: 27 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,34 @@ jobs:
large-packages: true
docker-images: true
swap-storage: true
- name: Build
id: build
uses: ./.github/actions/build-action
env:
FMO_BUILD_VERSION: "${{ steps.fmo-build-version.outputs.BUILD_VERSION }}"
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
BUILD_TARGET: "fmo-os-installer-debug"
CACHIX_TOKEN: ${{ secrets.CACHIX_TOKEN }}
RA_TOKEN: ${{ secrets.RA_TOKEN }}
name: fmo-os
authToken: '${{ secrets.CACHIX_TOKEN }}'
nix_path: nixpkgs=channel:nixos-unstable
enable_kvm: true
extra_nix_config: |
show-trace = true
max-jobs = auto
cores = 0
substitute = true
always-allow-substitute = true
substituters = https://cache.nixos.org https://nixpkgs.cachix.org https://nixpkgs-unfree.cachix.org https://nix-community.cachix.org
trusted-substituters = https://cache.nixos.org https://nixpkgs.cachix.org https://nixpkgs-unfree.cachix.org https://nix-community.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixpkgs.cachix.org-1:q91R6hxbwFvDqTSDKwDAV4T5PxqXGxswD8vhONFMeOE= nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
run: |
nix run nixpkgs#hello
nix flake show
#- name: Build
# id: build
# uses: ./.github/actions/build-action
# env:
# FMO_BUILD_VERSION: "${{ steps.fmo-build-version.outputs.BUILD_VERSION }}"
# with:
# BUILD_TARGET: "fmo-os-installer-debug"
# CACHIX_TOKEN: ${{ secrets.CACHIX_TOKEN }}
# RA_TOKEN: ${{ secrets.RA_TOKEN }}
#- name: Push to JFrog artifactory
# uses: ./.github/actions/upload-action-jfrog
# with:
Expand Down

0 comments on commit 4ce8160

Please sign in to comment.