Skip to content

OpenFaaS

OpenFaaS #19

Workflow file for this run

name: "OpenFaaS"
on:
schedule:
- cron: "0 2 * * *"
pull_request:
push:
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = ${{ vars.CACHE_TRUSTED_PUBLIC_KEYS }}
substituters = ${{ vars.CACHE_SUBSTITUTERS }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: dandart
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build
run: |
nix-build
- name: Push to Cachix
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --add-root result/shell --indirect) | cachix push dandart
- name: Push to private cache server
run: |
nix-store -qR --include-outputs $(nix-instantiate shell.nix --add-root result/shell --indirect) | xargs nix-copy-closure --gzip -s --include-outputs ${{ vars.CACHE_USER }}@${{ vars.CACHE_SERVER }}