depot/.forgejo/workflows/ci.yaml

51 lines
1.4 KiB
YAML

on: [push]
jobs:
build:
runs-on: cacher
strategy:
matrix:
system: [x86_64-linux, aarch64-linux]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Drop in ops/secrets/default.nix
run: |
echo "$OPS_SECRETS_DEFAULTNIX" > ops/secrets/default.nix
env:
OPS_SECRETS_DEFAULTNIX: "${{ secrets.OPS_SECRETS_DEFAULTNIX }}"
- name: Build
run: |
nix-build ci-root.nix -A linkFarm --system "${{ matrix.system }}"
cat result/other-systemPathJSON > system-paths-${{ matrix.system }}.json
- name: Upload outputs
run: |
bcacheup --cache_url vaultgs://lukegb-nix-cache --vault_addr unix:///run/tokend/sock --vault_token_source gcp/roleset/binary-cache-deployer/token ./result*
- name: Upload system paths
uses: forgejo/upload-artifact@v4
with:
name: system-paths-${{ matrix.system }}
path: system-paths-${{ matrix.system }}.json
combine-systems:
runs-on: cacher
needs: [build]
steps:
- name: Download outputs
uses: forgejo/download-artifact@v4
with:
path: system-paths
pattern: system-paths-*
- run: |
jq -s add system-paths/*/*.json > system-paths.json
- name: Upload merged
uses: forgejo/upload-artifact@v4
with:
name: system-paths
path: system-paths.json