Skip to content

Commit

Permalink
CI: reuse setup steps
Browse files Browse the repository at this point in the history
  • Loading branch information
42LoCo42 committed May 23, 2024
1 parent 06b2075 commit f63c6a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
12 changes: 12 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Install Nix
uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
substituters = https://cache.nixos.org https://42loco42.cachix.org https://attic.eleonora.gay/default
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= 42loco42.cachix.org-1:6HvWFER3RdTSqEZDznqahkqaoI6QCOiX2gRpMMsThiQ= default:XPg5h4CW7EI+JTHIwsCTDSw+KxNHQoujFcUoc7a0mDQ=
12 changes: 2 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-all
name: "Run the primary CI"

on:
workflow_dispatch:
Expand All @@ -10,15 +10,7 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
substituters = https://cache.nixos.org https://42loco42.cachix.org https://attic.eleonora.gay/default
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= 42loco42.cachix.org-1:6HvWFER3RdTSqEZDznqahkqaoI6QCOiX2gRpMMsThiQ= default:XPg5h4CW7EI+JTHIwsCTDSw+KxNHQoujFcUoc7a0mDQ=
- uses: 42loco42/obscura/.github/actions/setup

- name: Run CI
run: nix run .#ci
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/nvidia.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build NVIDIA stuff every day at 3:00
name: "Build NVIDIA packages"

on:
workflow_dispatch:
Expand All @@ -11,19 +11,9 @@ jobs:
permissions:
contents: write
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Install Nix
uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
substituters = https://cache.nixos.org https://42loco42.cachix.org https://attic.eleonora.gay/default
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= 42loco42.cachix.org-1:6HvWFER3RdTSqEZDznqahkqaoI6QCOiX2gRpMMsThiQ= default:XPg5h4CW7EI+JTHIwsCTDSw+KxNHQoujFcUoc7a0mDQ=
- uses: 42loco42/obscura/.github/actions/setup

- name: Update, build, push
- name: Update, build, push to cache
run: |
old="$(sha256sum flake.lock)"
nix flake update nixpkgs-new
Expand Down

0 comments on commit f63c6a5

Please sign in to comment.