feat: make NIX_SIGNING_KEY optional, skip Nix cache push if unset
This commit is contained in:
parent
4af132296e
commit
4b1bbce9af
1 changed files with 3 additions and 4 deletions
|
|
@ -1,10 +1,8 @@
|
||||||
name: Deploy Static Site
|
name: Deploy Static Site
|
||||||
description: Build site with Nix, push tarball to S3, deploy via Nomad with shared static-server image
|
description: Build site with Nix, push tarball to S3, deploy via Nomad with shared static-server image
|
||||||
|
|
||||||
# Expected env vars (set by calling workflow from secrets):
|
# Required env vars: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, NOMAD_TOKEN
|
||||||
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
# Optional env vars: NIX_SIGNING_KEY (if set, signs and pushes Nix closure to S3 binary cache)
|
||||||
# NIX_SIGNING_KEY
|
|
||||||
# NOMAD_TOKEN
|
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
domain:
|
domain:
|
||||||
|
|
@ -58,6 +56,7 @@ runs:
|
||||||
run: nix build ".#${{ inputs.flake-output }}" --out-link result-site
|
run: nix build ".#${{ inputs.flake-output }}" --out-link result-site
|
||||||
|
|
||||||
- name: Sign and push Nix closure to S3 cache
|
- name: Sign and push Nix closure to S3 cache
|
||||||
|
if: env.NIX_SIGNING_KEY != ''
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "${NIX_SIGNING_KEY}" > /tmp/nix-key
|
echo "${NIX_SIGNING_KEY}" > /tmp/nix-key
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue