feat: avility disable cache
This commit is contained in:
@@ -2,8 +2,14 @@
|
|||||||
# yamllint disable rule:line-length
|
# yamllint disable rule:line-length
|
||||||
name: deploy neuro
|
name: deploy neuro
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
on: # yamllint disable-line rule:truthy
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
upload_cache:
|
||||||
|
description: Upload build outputs to Attic
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: deploy-neuro
|
group: deploy-neuro
|
||||||
@@ -41,6 +47,7 @@ jobs:
|
|||||||
- name: Deploy neuro
|
- name: Deploy neuro
|
||||||
env:
|
env:
|
||||||
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
UPLOAD_CACHE: ${{ inputs.upload_cache }}
|
||||||
WITH_ATTIC_BUILD_TIMEOUT: "21600"
|
WITH_ATTIC_BUILD_TIMEOUT: "21600"
|
||||||
WITH_ATTIC_DRAIN_TIMEOUT: "3600"
|
WITH_ATTIC_DRAIN_TIMEOUT: "3600"
|
||||||
WITH_ATTIC_UPLOAD_TIMEOUT: "600"
|
WITH_ATTIC_UPLOAD_TIMEOUT: "600"
|
||||||
@@ -78,6 +85,20 @@ jobs:
|
|||||||
-i "$HOME/.ssh/id_ed25519" \
|
-i "$HOME/.ssh/id_ed25519" \
|
||||||
neuro true
|
neuro true
|
||||||
# Run deploy tool from checked-out Gitea revision; repository is not mirrored on GitHub.
|
# Run deploy tool from checked-out Gitea revision; repository is not mirrored on GitHub.
|
||||||
nix run --refresh '.#with-attic-cache' -- -- \
|
case "$UPLOAD_CACHE" in
|
||||||
nix run --refresh '.#deploy' -- \
|
true)
|
||||||
push -- --flake '.#neuro|x86_64-linux' --target-host neuro --use-remote-sudo
|
nix run --refresh '.#with-attic-cache' -- -- \
|
||||||
|
nix run --refresh '.#deploy' -- \
|
||||||
|
push -- --flake '.#neuro|x86_64-linux' --target-host neuro --use-remote-sudo
|
||||||
|
;;
|
||||||
|
false)
|
||||||
|
unset ATTIC_TOKEN
|
||||||
|
timeout --kill-after=60s 21600s \
|
||||||
|
nix run --refresh '.#deploy' -- \
|
||||||
|
push -- --flake '.#neuro|x86_64-linux' --target-host neuro --use-remote-sudo
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf 'unsupported upload_cache value: %s\n' "$UPLOAD_CACHE" >&2
|
||||||
|
exit 64
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user