nix/.forgejo/workflows/ssh-test.yml

58 lines
1.5 KiB
YAML
Raw Normal View History

2023-12-08 12:04:16 +01:00
name: ssh-test
run-name: ${{ github.actor }} - ssh-test
2023-12-08 12:04:24 +01:00
on:
push:
branches:
- main
2023-12-08 12:04:16 +01:00
jobs:
ssh-test:
runs-on: docker
container:
image: alpine:edge
steps:
- name: "Setup: Runner"
run: |
apk update
2023-12-08 12:24:05 +01:00
apk add git nodejs nix openssh-client --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
2023-12-08 12:04:16 +01:00
- uses: actions/checkout@v3
- name: "Directory Structure"
run: |
ls ${{ github.workspace }}/*
- name: "Runner: Node Info"
run: |
2023-12-08 12:11:36 +01:00
echo "pwd"
2023-12-08 12:05:58 +01:00
pwd
2023-12-08 12:11:36 +01:00
echo "ls -lah"
ls -lah
echo 'id'
2023-12-08 12:04:16 +01:00
id
2023-12-08 12:11:36 +01:00
echo "uname -a"
2023-12-08 12:04:16 +01:00
uname -a
2023-12-08 12:11:36 +01:00
echo "hostname"
2023-12-08 12:04:16 +01:00
hostname
2023-12-08 12:11:36 +01:00
echo "/etc/os-release"
2023-12-08 12:04:16 +01:00
cat /etc/os-release
2023-12-08 12:13:55 +01:00
echo "whoami"
whoami
2023-12-08 12:04:16 +01:00
- name: "Nix Version"
run: |
nix --version
2023-12-08 12:05:58 +01:00
- name: "Setup: SSH"
run: |
2023-12-08 12:17:43 +01:00
mkdir /root/.ssh
2023-12-08 12:22:27 +01:00
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
2023-12-08 12:23:16 +01:00
ssh albert@framework-server "ls /Storage"
2023-12-08 12:04:16 +01:00
# - name: "Nix build"
# run: |
# echo "Running Nix Build"
# nix --extra-experimental-features "nix-command flakes" \
# build /workspace/albert/nix#imageConfigurations.nixos-iso-desktop
# echo "Results:"
# ls -lah result/iso/
- if: always()
run: rm -rf /.cache
- if: always()
run: rm -rf ${{ github.worksspace }}