gitactions #6
31
.gitea/workflows/test-on-push.yaml
Normal file
31
.gitea/workflows/test-on-push.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Test Flake
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
test_flake:
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: check nixos flake
|
||||
run: /run/current-system/sw/bin/nix --extra-experimental-features nix-command --extra-experimental-features flakes flake check --all-systems --verbose
|
||||
|
||||
- name: check home-manager flake
|
||||
run: "/run/current-system/sw/bin/nix --extra-experimental-features nix-command --extra-experimental-features flakes eval .#homeConfigurations --apply 'builtins.mapAttrs (_n: v: v.activationPackage.drvPath)' --verbose"
|
||||
|
||||
dry_build:
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Test Build
|
||||
run: |
|
||||
/run/current-system/sw/bin/nixos-rebuild dry-build --flake .#yukigekko
|
||||
/run/current-system/sw/bin/nixos-rebuild dry-build --flake .#lesbos
|
||||
/run/current-system/sw/bin/nixos-rebuild dry-build --flake .#wsl-hive
|
||||
/run/current-system/sw/bin/nixos-rebuild dry-build --flake .#hoardfrost
|
||||
26
.gitea/workflows/update.yaml
Normal file
26
.gitea/workflows/update.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Update Flake
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 23 * * *'
|
||||
jobs:
|
||||
update_flake:
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Prevent re-runs
|
||||
run: |
|
||||
if [ "$GITHUB_RUN_ATTEMPT" -gt 1 ]; then
|
||||
echo "No re-runs for you. Go away."
|
||||
exit 1
|
||||
else
|
||||
echo "not a re-run"
|
||||
fi
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Update Flake
|
||||
run: /run/current-system/sw/bin/nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update --refresh --commit-lock-file --verbose
|
||||
|
||||
- name: Push Changes
|
||||
run: git push
|
||||
Reference in New Issue
Block a user