feat: add fly.io deploy workflow
This commit is contained in:
parent
eef9985d31
commit
7ccbc087aa
3 changed files with 26 additions and 58 deletions
26
.github/workflows/deploy-vault.yaml
vendored
Normal file
26
.github/workflows/deploy-vault.yaml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: Deploy Vaultwarden to Fly.io
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/deploy-vault.yaml
|
||||
- "flyio/vaultwarden/fly.toml"
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: setup flyctl
|
||||
uses: superfly/flyctl-actions/setup-flyctl@master
|
||||
|
||||
- name: Publish
|
||||
run: flyctl deploy --config fly/vaultwarden/fly.toml
|
||||
env:
|
||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||
FLY_APP: ${{ secrets.FLY_APP_VAULTWARDEN }}
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixos": {
|
||||
"locked": {
|
||||
"lastModified": 1713145326,
|
||||
"narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixos": "nixos"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
description = "A flake to build a basic NixOS iso";
|
||||
inputs.nixos.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
outputs =
|
||||
{ self
|
||||
, nixos
|
||||
,
|
||||
}: {
|
||||
nixosConfigurations =
|
||||
let
|
||||
exampleBase = {
|
||||
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||
systemd.services.sshd.wantedBy = nixos.lib.mkForce [ "multi-user.target" ];
|
||||
users.users.root.openssh.authorizedKeys.keys = [ "<my ssh key>" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
x86 = nixos.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
exampleBase
|
||||
];
|
||||
};
|
||||
example = nixos.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ exampleBase ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in a new issue