mirror of
https://github.com/matter-labs/nixsgx.git
synced 2025-07-22 15:54:47 +02:00
ci: manual nixsgx cache upload
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
parent
d9eb744741
commit
c1955bc046
1 changed files with 37 additions and 0 deletions
37
.github/workflows/cachix.yml
vendored
Normal file
37
.github/workflows/cachix.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: cachix
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
push:
|
||||
branches: ["main"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
target_branch:
|
||||
description: "Target branch to upload cachix"
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
with:
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ github.token }}
|
||||
- uses: cachix/cachix-action@v15
|
||||
with:
|
||||
name: nixsgx
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
- name: Enable magic Nix cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- name: nix build
|
||||
run: nix run github:nixos/nixpkgs/nixos-23.11#nixci
|
||||
|
||||
- name: manual cachix upload
|
||||
run: |
|
||||
a=($(nix flake show --accept-flake-config --json | jq -r ".packages.\"x86_64-linux\" | keys | @sh" | tr -d \\\' ))
|
||||
nix build --accept-flake-config --json "${a[@]/#/.#}" | jq -r '.[].outputs | to_entries[].value' | cachix push nixsgx
|
Loading…
Add table
Add a link
Reference in a new issue