Skip to content

Commit

Permalink
Workflows: Update actions & Check packages upon push
Browse files Browse the repository at this point in the history
  • Loading branch information
harukafractus authored and bandithedoge committed Mar 9, 2024
1 parent 119eee2 commit 4fb5fb7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Check evaluation"
on: [push]
jobs:
check_evaluation:
runs-on: macos-14 # The processor on this label is M1, not x86_64
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install nix
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Verify update.sh
run: |
chmod +x update.sh
./update.sh
- name: Build nix packages
run: nix-build ci-shell.nix
17 changes: 9 additions & 8 deletions .github/workflows/update-sources.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
name: update-sources
name: "Update sources"
on:
workflow_dispatch:
workflow_run:
workflows: ["Check evaluation"]
types:
- completed
schedule:
# runs every midnight
- cron: "0 0 * * *"
push:
branches:
- main

jobs:
update-sources:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v16
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable

Expand All @@ -26,7 +27,7 @@ jobs:
./update.sh
- name: Commit changes
uses: EndBug/add-and-commit@v7.5.0
uses: EndBug/add-and-commit@v9.1.4
with:
default_author: github_actions
message: "Update sources"
Expand Down
10 changes: 10 additions & 0 deletions ci-shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ pkgs ? import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; } }:
pkgs.mkShell {
packages = with pkgs; [
firefox-bin
firefox-beta-bin
firefox-devedition-bin
firefox-esr-bin
firefox-nightly-bin
];
}

0 comments on commit 4fb5fb7

Please sign in to comment.