Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faithkovi workflow #20

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 2 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,8 @@ defaults:

jobs:
test:
name: Test bot script on ${{ matrix.os }} with ${{ matrix.compiler }}.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [ g++-10 ]
include:
- os: ubuntu-latest
compiler: g++-10
target: Linux

- os: macos-latest
compiler: g++-10
target: Macos

- os: windows-latest
compiler: cl
target: Windows

name: Test bot script on ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run shell script
Expand Down
58 changes: 15 additions & 43 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,49 +1,21 @@
#!/bin/bash
set -euxo pipefail #exit in case of errors
set -euo pipefail #exit in case of errors

# install dependencies
while true; do
echo -e '\e[91mPLEASE INPUT SUDO PASSWORD WHEN PROMPTED OTHERWISE TERMINAL WILL CLOSE SCRIPT\e[39m'

system=$(uname)

if [[ $system == "Linux" ]]; then
echo
# Setup Githubcli Keyring
if type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
sudo apt install -y ca-certificates gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \
sudo apt update && sudo apt install -y gh git nodejs; then
echo
break
else
echo -e "\xE2\x9D\x8C An error occurred while executing the script"
return
fi
echo
break

elif [[ $system == "Darwin" ]]; then
if brew update && brew install git gh curl node npm; then
echo
break
else
return
fi
echo
break

elif [[ $system == "CYGWIN" || "$(uname)" == * ]]; then
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y git gh curl nodejs
fi

done
if type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
sudo apt install -y ca-certificates gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \
sudo apt update && sudo apt install -y gh git nodejs; then
echo -e "dependencies installed successfully"
else
echo -e "\xE2\x9D\x8C An error occurred while executing the script"
return
fi
echo
#Configures git
read -p $'\e[1mEnter Github username: \e[22m' username
Expand Down
Loading