Skip to content

Commit

Permalink
.github/workflows: Use ssh-runner.yml from weshnet (not berty)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Thompson <jeff@thefirst.org>
  • Loading branch information
jefft0 committed Oct 25, 2024
1 parent ba6b73a commit e8ef88b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 51 deletions.
63 changes: 14 additions & 49 deletions .github/workflows/ssh-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ on:
workflow_dispatch:
inputs:
os:
description: "Operating System"
description: 'Operating System'
required: true
default: ubuntu-latest
type: choice
options:
- ubuntu-latest
- macos-latest
- windows-latest
- ubuntu-latest
- macos-latest
- windows-latest
mod:
description: "Install Go/Node modules"
description: 'Install Go/Node modules'
required: true
default: true
type: boolean
Expand Down Expand Up @@ -43,64 +43,29 @@ jobs:
asdf install golang
echo "go_version=$(asdf current golang | xargs | cut -d ' ' -f 2)" >> $GITHUB_ENV
- name: Setup node
if: runner.os != 'Windows'
run: |
asdf plugin add nodejs
asdf install nodejs
echo "node_version=$(asdf current nodejs | xargs | cut -d ' ' -f 2)" >> $GITHUB_ENV
- name: Setup yarn
if: runner.os != 'Windows'
run: |
asdf plugin add yarn
asdf install yarn
- name: Cache go modules
if: github.event.inputs.mod == 'true' && runner.os != 'Windows'
uses: actions/cache@v2.1.6
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('go/**/go.sum') }}
key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-

- name: Cache node modules
if: github.event.inputs.mod == 'true' && runner.os != 'Windows'
uses: actions/cache@v2.1.6
with:
path: js/node_modules
key: ${{ runner.OS }}-node-${{ env.node_version }}-${{ env.json_cache-versions_node }}-${{ hashFiles('js/yarn.lock') }}
restore-keys: ${{ runner.OS }}-node-${{ env.node_version }}-${{ env.json_cache-versions_node }}-

- name: Fetch go modules
if: github.event.inputs.mod == 'true' && runner.os != 'Windows'
working-directory: go
working-directory: .
run: go mod tidy

- name: Fetch node modules
if: github.event.inputs.mod == 'true' && runner.os != 'Windows'
working-directory: js
run: make node_modules

- name: Install emacs
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y emacs
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install emacs
else
echo "Already installed!"
fi
- name: Install LazyVim
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
git clone https://github.com/LazyVim/starter $env:LOCALAPPDATA\nvim
else
git clone https://github.com/LazyVim/starter ~/.config/nvim
fi
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y emacs
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install emacs
else
echo "Already installed!"
fi
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand Down
2 changes: 0 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
golang 1.22.5
golangci-lint 1.57.2
# Add nodejs for the CI workflows
nodejs 16.16.0

0 comments on commit e8ef88b

Please sign in to comment.