Actions: Add build action
This commit is contained in:
parent
50181d9e57
commit
f9ad10d811
1 changed files with 37 additions and 0 deletions
37
.forgejo/workflows/publish.yaml
Normal file
37
.forgejo/workflows/publish.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
name: build and publish containers
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * 1,3,5"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: nixos-latest
|
||||||
|
strategy: &strategy
|
||||||
|
matrix:
|
||||||
|
container: [ nixos ]
|
||||||
|
version: [ "24.11", "unstable" ]
|
||||||
|
steps:
|
||||||
|
- name: pre-requisites
|
||||||
|
run: |
|
||||||
|
nix-env -iA nixpkgs.docker nixpkgs.nodejs_20 nixpkgs.gnused nixpkgs.coreutils && mkdir -p ~/.config/nix && echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: 'main'
|
||||||
|
- name: nix package names
|
||||||
|
id: pkgs
|
||||||
|
run: |
|
||||||
|
echo "pkgs-name=${{ matrix.container }}-${{ matrix.version }}" | tr -d . >>"${GITHUB_OUTPUT}""
|
||||||
|
- name: build
|
||||||
|
uses: actions/nix/build@main
|
||||||
|
with:
|
||||||
|
package: ${{ steps.pkgs.outputs.pkgs-name }}
|
||||||
|
out-link: ${{ steps.pkgs.outputs.pkgs-name }}
|
||||||
|
- name: load image into docker
|
||||||
|
run: |
|
||||||
|
docker load < ${{ steps.pkg.outputs.pkg-name }}
|
Loading…
Add table
Reference in a new issue