Compare commits

..

20 commits
main ... main

Author SHA1 Message Date
bdbf720c05 Docs. Adding documentation about the new nix build deploy action
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-04 17:28:40 +01:00
e35f409ae2 Fix. Removing the unneccesary nix-version input
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-04 17:28:10 +01:00
a8089bb1a9 Fix. Forgot to create the temp folder
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-04 17:18:33 +01:00
3a3b07c7dc Testing a new action package that consumes my one
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-04 14:54:52 +01:00
0ff0581138 Testing copying contents of symlink folder
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-04 14:27:20 +01:00
561724501d Fix. Accept installation storage space changes
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-04 12:26:07 +01:00
1e9c0e4d79 Reverting back to hard code version
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 13:06:32 +01:00
3a9995c42e Reverting back to nix --version at end of action
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 13:01:14 +01:00
294eda4fdd Updating nix_path input name and description. Changing the nix-version to provide the channel too
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 11:30:12 +01:00
aeb2c5dd7d Using full nix path pass through the action
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 11:19:47 +01:00
d3a8f05f3e Test. Listing out nix channels
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 10:43:04 +01:00
fe8e9ed67e Fix. Seeing if the underscore was what was causing the issue with this
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 10:36:31 +01:00
abcd2cb649 Fix. Specifying input properly
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 10:18:24 +01:00
92eac99ce5 Doc. Documenting the nix_version input
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 10:05:17 +01:00
38685b8e2d Feat. Allowing the owner of the action to specify the nix version
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 09:59:23 +01:00
cc3eeb312d Renaming action to match what it is doing.
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 09:56:22 +01:00
cd0882455f Doc. Specifying the tag for the docker nix action
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
2024-10-01 09:55:05 +01:00
Eoghan Conlon
340c263734 Doc. Adding documentation for the new action 2024-09-30 21:26:47 +01:00
Eoghan Conlon
44b3b2c23c Feat. Adding the rest of the steps to get nix to the action 2024-09-30 21:18:44 +01:00
Eoghan Conlon
d085245659 Feat. Adding docker_nix action 2024-09-30 21:07:46 +01:00
4 changed files with 61 additions and 1 deletions

View file

@ -104,3 +104,25 @@ jobs:
folder: "src"
#destination: "subfolder"
```
## Docker Nix
This action is used to get nix into the docker user deploy system.
### v7
```yaml
jobs:
build:
runs-on: docker
steps:
uses: https://forgejo.skynet.ie/Skynet/actions/docker_nix@v7
```
## Nix build Deploy user
This action can build your website if you develop it using different methods than writing HTML. Only pre-requisite is that
this action uses the Nix build command, so your repository requires a nix flake.
```yaml
jobs:
build:
runs-on: docker
steps:
uses: https://forgejo.skynet.ie/Skynet/actions/nix-build_deploy@v7
```

View file

@ -23,4 +23,4 @@ ssh ${USERNAME}@skynet.skynet.ie "mkdir -p ~/public_html && chmod 711 ~ || true
ssh ${USERNAME}@skynet.skynet.ie "mkdir -p ~/public_html/${DESTINATION}"
# copy files across
scp -r ${FOLDER}/* ${USERNAME}@skynet.skynet.ie:/home/${USERNAME}/public_html/${DESTINATION}
scp -rL ${FOLDER}/* ${USERNAME}@skynet.skynet.ie:/home/${USERNAME}/public_html/${DESTINATION}

19
docker_nix/action.yml Normal file
View file

@ -0,0 +1,19 @@
name: 'Get image ready to run nix jobs'
description: 'Update apt repositories and installing sudo'
runs:
using: 'composite'
steps:
- name: 'Installing nix on Docker runner'
shell: bash
run: |
apt update
apt upgrade -y
apt install -y sudo
- uses: https://github.com/cachix/install-nix-action@v29
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = skynet-cache:zMFLzcRZPhUpjXUy8SF8Cf7KGAZwo98SKrzeXvdWABo= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://nix-cache.skynet.ie/skynet-cache https://hydra.iohk.io https://cache.nixos.org/
- shell: bash
run: nix --version

View file

@ -0,0 +1,19 @@
name: "Deploying from a Nix Build"
description: "Deploys a website when built from a nix flake"
runs:
using: 'composite'
steps:
- uses: https://forgejo.skynet.ie/eoghanconlon73/actions/docker_nix@eoghan_test-final3
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://forgejo.skynet.ie/Skynet/actions/get_lfs@v6
with:
repository: ${{ gitea.repository }}
ref_name: ${{ gitea.ref_name }}
- run: nix build
- run: mkdir temp
- run: cp -rL result/* ./temp
- uses: https://forgejo.skynet.ie/Skynet/actions/deploy_user@v6
with:
ssh_key: ${{ secrets.SSH_KEY }}
username: ${{ env.GITHUB_REPOSITORY_OWNER }}
folder: "result"