Skip to content

feat: initial merge of ci.yml and cd.yml workflows to begin testing (no removing live CI workflows yet) #444

feat: initial merge of ci.yml and cd.yml workflows to begin testing (no removing live CI workflows yet)

feat: initial merge of ci.yml and cd.yml workflows to begin testing (no removing live CI workflows yet) #444

Workflow file for this run

name: "Nix Devshells CI"
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
repository_dispatch:
types: [test-run-pr]
env:
AWS_DEFAULT_REGION: eu-central-1
jobs:
build-and-test:
permissions:
id-token: write
contents: read
strategy:
matrix:
os: [nixos, macos]
runs-on:
- self-hosted
- ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: Acquire AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_ }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Add signing key for nix
run: echo "${{ secrets.NIX_SIGNING_KEY }}" > "${{ runner.temp }}/nix-key"
- name: Run nixci to build/test all outputs
run: |
nix run github:srid/nixci -- -v build -- --fallback > /tmp/outputs
- name: Copy nix scopes to nix cache
run: |
nix-store --stdin -q --deriver < /tmp/outputs | nix-store --stdin -qR --include-outputs \
| nix copy --stdin --to \
"s3://cache.sc.iog.io?secret-key=${{ runner.temp }}/nix-key&region=$AWS_DEFAULT_REGION" \
&& rm /tmp/outputs