2023-09-22 20:12:32 +02:00
|
|
|
---
|
|
|
|
name: test nix/build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-09-22 22:14:43 +02:00
|
|
|
paths:
|
|
|
|
- '.forgejo/workflows/nix-build.yaml'
|
|
|
|
- 'build/**'
|
2023-09-22 20:12:32 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
nix/build:
|
|
|
|
runs-on: nixos-flakes
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: build the local test package
|
|
|
|
id: build-local
|
|
|
|
uses: ./build
|
|
|
|
with:
|
|
|
|
flake: ./build/test
|
|
|
|
package: "hello"
|
|
|
|
logs: true
|
|
|
|
|
|
|
|
- name: print the output path
|
|
|
|
run: |
|
|
|
|
echo ${{ steps.build-local.outputs.output-path }}
|
|
|
|
|
|
|
|
- name: build a package from nixpkgs
|
|
|
|
id: build-nixpkgs
|
|
|
|
uses: ./build
|
|
|
|
with:
|
|
|
|
flake: nixpkgs
|
|
|
|
package: "hello"
|
|
|
|
logs: true
|
|
|
|
|
|
|
|
- name: print the output path
|
|
|
|
run: |
|
|
|
|
echo ${{ steps.build-nixpkgs.outputs.output-path }}
|