forked from holochain/holochain
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 2.13 KB
/
ssh-session.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# An action triggered manually to debug the cached state for `release.yml` and `release-prepare.yml`
name: SSH session
on:
workflow_dispatch:
inputs:
runs-on:
description: "value passed to 'runs-on'"
required: false
default: "ubuntu-latest"
type: string
extend-space:
description: "extend the runner's space"
required: false
default: "false"
type: string
jobs:
ssh-session:
runs-on: ${{ github.event.inputs.runs-on }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extend space
uses: ./.github/actions/extend-space
if: ${{ github.event.inputs.runs-on == 'ubuntu-latest' && github.event.inputs.extend-space == 'true' }}
- name: Install nix
uses: cachix/install-nix-action@v20
if: ${{ github.event.inputs.runs-on != 'multi-arch' }}
with:
extra_nix_config: |
experimental-features = flakes nix-command
- name: Setup cachix
uses: cachix/cachix-action@v12
if: ${{ matrix.platform.runs-on != 'multi-arch' }}
with:
name: holochain-ci
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Restart nix-daemon
if: ${{ github.event.inputs.runs-on == 'ubuntu-latest' }}
run: |
sudo bash -c 'echo extra-experimental-features = impure-derivations >> /etc/nix/nix.conf'
sudo systemctl stop nix-daemon
- name: debug
run: |
set -x
env
nix-shell --version
nix --version
pwd
- name: Setup SSH session
uses: lhotari/action-upterm@v1
env:
ORIG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HRA_GITHUB_TOKEN: ${{ secrets.HRA_GITHUB_TOKEN }}
if: ${{ always() }}
with:
## limits ssh access and adds the ssh public key for the user which triggered the workflow
limit-access-to-actor: true
## limits ssh access and adds the ssh public keys of the listed GitHub users
limit-access-to-users: steveeJ,jost-s,freesig,neonphog,thedavidmeister,maackle