Skip to content

trigger-workflow

trigger-workflow #39

Workflow file for this run

name: "Build tree"
on:
push:
branches:
- main
repository_dispatch:
types: [trigger-workflow]
jobs:
build-tree:
runs-on: ${{ matrix.os }}
permissions:
id-token: "write"
contents: "read"
strategy:
matrix:
os: [ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Access Payload Data
run: |
echo "Branch: ${{ github.event.client_payload.ref_name }}"
- run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sed -i 's/REPLACE_DATE/${{ github.event.client_payload.ref_name }}/g' default.nix
else
sed -i '' 's/REPLACE_DATE/${{ github.event.client_payload.ref_name }}/g' default.nix
fi
- name: Build on date ${{ github.event.client_payload.ref_name }}
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
nix-build --keep-going --max-jobs 1 --cores 2 --argstr system x86_64-linux default.nix
nix-build --keep-going --max-jobs 1 --cores 2 --argstr system aarch64-linux default.nix
else
nix-build --keep-going --max-jobs 1 --cores 2 default.nix
fi
#- run: nix-store -qR --include-outputs $(nix-instantiate cachix.nix) | cachix push rstats-on-nix
- run: nix-shell default.nix --run "echo OK"
- name: Upload /nix/store as an artifact
uses: actions/upload-artifact@v3
with:
name: nix-store
path: /nix/store/