Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Add state and preserve env #7

Add state and preserve env

Add state and preserve env #7

Workflow file for this run

name: tailscale-file
on:
push:
branches: [ main ]
jobs:
file-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/gbraad-devenv/fedora/dotfiles:39
volumes:
- workspace:/workspace
options: --cpus 1
steps:
- name: Tailscale setup (root)
run: |
sudo dnf update -y tailscale
sudo sed -i 's|--state=/var/lib/tailscale/tailscaled.state|--state=mem:|' /etc/init.d/tailscaled
sudo sed -i 's|--socket=/run/tailscale/tailscaled.sock|--socket=/var/run/tailscale/tailscaled.sock|' /etc/init.d/tailscaled
sudo sed -i '/--port 41641/ s/$/\n --tun=userspace-networking \\/' /etc/init.d/tailscaled
- name: Tailscale setup (user)
run: |
sudo chmod o+w /var/run/tailscale/
/etc/init.d/tailscaled start
until tailscale up
do
sleep 0.1
done
tailscale set --hostname github-${HOSTNAME}
env:
TAILSCALE_AUTHKEY: ${{ secrets.TAILSCALE_AUTHKEY}}
- name: Download files
run: |
mkdir -p /tmp/Downloads
cd /tmp/Downloads
curl -O https://link.testfile.org/PDF20MB
- name: Send files with Tailscale to fixed target
run: |
tailscale file cp /tmp/Downloads/* ncentre-proxy: