nix/.forgejo/workflows/ssh-test.yml
iFargle cedca8b8b5
Some checks failed
ssh-test / ssh-test (push) Failing after 14s
test
2023-12-08 20:27:53 +09:00

60 lines
No EOL
1.5 KiB
YAML

name: ssh-test
run-name: ${{ github.actor }} - ssh-test
on:
push:
branches:
- main
jobs:
ssh-test:
runs-on: docker
container:
image: alpine:edge
steps:
- name: "Setup: Runner"
run: |
apk update
apk add git nodejs nix openssh-client --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
- uses: actions/checkout@v3
- name: "Directory Structure"
run: |
ls ${{ github.workspace }}/*
- name: "Runner: Node Info"
run: |
echo "pwd"
pwd
echo "ls -lah"
ls -lah
echo 'id'
id
echo "uname -a"
uname -a
echo "hostname"
hostname
echo "/etc/os-release"
cat /etc/os-release
echo "whoami"
whoami
echo "cat /etc/resolv.conf"
cat /etc/resolv.conf
- name: "Nix Version"
run: |
nix --version
- name: "Setup: SSH"
run: |
mkdir /root/.ssh
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
ssh albert@100.64.0.14 "ls /Storage"
# - 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 }}