Tweaked the build flake action
All checks were successful
Check config / build (push) Successful in 9m46s
All checks were successful
Check config / build (push) Successful in 9m46s
This commit is contained in:
parent
305352a3c4
commit
e53c367ab5
@ -8,7 +8,16 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get current time
|
||||||
|
uses: josStorer/get-current-time@v2
|
||||||
|
id: start-time
|
||||||
|
with:
|
||||||
|
utcOffset: "+02:00" # Summer time in France
|
||||||
|
|
||||||
- name: Install nix
|
- name: Install nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
with:
|
with:
|
||||||
@ -16,6 +25,8 @@ jobs:
|
|||||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc= nix-citizen.cachix.org-1:lPMkWc2X8XD4/7YPEEwXKKBg+SVbYTVrAaLA2wQTKCo=
|
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc= nix-citizen.cachix.org-1:lPMkWc2X8XD4/7YPEEwXKKBg+SVbYTVrAaLA2wQTKCo=
|
||||||
trusted-substituters = https://cache.nixos.org https://nix-community.cachix.org https://hyprland.cachix.org https://nix-citizen.cachix.org
|
trusted-substituters = https://cache.nixos.org https://nix-community.cachix.org https://hyprland.cachix.org https://nix-citizen.cachix.org
|
||||||
|
|
||||||
|
- name: Setup nix cache (experimental)
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -24,6 +35,29 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
nix build .#nixosConfigurations.FW16.config.system.build.toplevel
|
nix build .#nixosConfigurations.FW16.config.system.build.toplevel
|
||||||
|
|
||||||
|
- name: Get Build time
|
||||||
|
uses: josStorer/get-current-time@v2
|
||||||
|
id: end-time
|
||||||
|
with:
|
||||||
|
utcOffset: "+02:00" # Summer time in France
|
||||||
|
|
||||||
|
- name: Calculate build time
|
||||||
|
id: duration
|
||||||
|
run: |
|
||||||
|
duration=$((${{ steps.start-time.outputs.time }} - ${{ steps.end-time.outputs.time }}))
|
||||||
|
echo "duration=${duration}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Notify Failure
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
curl \
|
||||||
|
-H "Title: Failed to build flake !"\
|
||||||
|
-d "Build started on ${{ steps.start-time.outputs.readableTime }} and failed.\nLasted ${{ steps.duration.outputs.duration }}" \
|
||||||
|
https://ntfy.alexdelcamp.fr/FlakeBuild
|
||||||
|
|
||||||
- name: Notify Success
|
- name: Notify Success
|
||||||
run: |
|
run: |
|
||||||
curl -H "Title: Successfully builded flake!" -d "Builded Framework flake" https://ntfy.alexdelcamp.fr/FlakeBuild
|
curl \
|
||||||
|
-H "Title: Successfully builded flake!" \
|
||||||
|
-d "Build started on ${{ steps.start-time.outputs.readableTime }} and succeeded.\nLasted ${{ steps.duration.outputs.duration }}" \
|
||||||
|
https://ntfy.alexdelcamp.fr/FlakeBuild
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user