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

Simplified installer, added workflows #108

Merged
merged 11 commits into from
Dec 21, 2023
23 changes: 23 additions & 0 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
branches:
- master


jobs:
build-deb:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -45,4 +47,25 @@ jobs:
echo "Creating release: $RELEASE_NAME (tag: $TAG_NAME)"
gh release create "$TAG_NAME" -t "$RELEASE_NAME" -n "Release for version $VERSION" kali-anonsurf.deb

notify-release:
needs: release
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Get version from control file
run: |
VERSION=$(grep '^Version:' kali-anonsurf-deb-src/DEBIAN/control | cut -d' ' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Call Webhook
run: |
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"text": "Published [Kali-anonsurf $VERSION](https://github.com/Und3rf10w/kali-anonsurf/releases/tag/$VERSION)!\n",
"format": "markdown", "displayName": "Github Actions - Kali-anonsurf"
}' \
${{ secrets.WEBHOOK_URL }}
27 changes: 27 additions & 0 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test install on Kali Linux

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test-install:
runs-on: ubuntu-latest
container:
image: kalilinux/kali-rolling:latest # Use the correct tag

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Update packages and install dependencies
run: |
apt-get update
apt-get install -y ca-certificates

# Running installer.sh
- name: Run installer script
run: |
./installer.sh
21 changes: 14 additions & 7 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,28 @@ fi
# For upgrades and sanity check, remove any existing i2p.list file
rm -f /etc/apt/sources.list.d/i2p.list

# Install gnupg if not installed
if ! command -v gpg; then
apt-get update
apt-get install -y gnupg
fi

# Compile the i2p ppa
echo "deb https://ppa.launchpadcontent.net/i2p-maintainers/i2p/ubuntu noble main" > /etc/apt/sources.list.d/i2p.list # Default config reads repos from sources.list.d
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AB9660B9EB2CC88B # Add i2p maintainer keys # TODO: Is there a more universal way to do this?
apt-get update # Update repos

if [[ -n $(cat /etc/os-release |grep kali) ]]
then
apt-get install libservlet3.1-java libecj-java libgetopt-java glassfish-javaee ttf-dejavu i2p i2p-router libjbigi-jni libjetty8-java #installs i2p and other dependencies
apt-get -f install # resolves anything else in a broken state
fi

apt-get install -y secure-delete tor i2p # install dependencies, just in case
apt-get install -y secure-delete tor i2p i2p-router # install dependencies, just in case

# Configure and install the .deb
dpkg-deb -b kali-anonsurf-deb-src/ kali-anonsurf.deb # Build the deb package
dpkg -i kali-anonsurf.deb || (apt-get -f install && dpkg -i kali-anonsurf.deb) # this will automatically install the required packages


# Check if kali-anonsurf package is already installed
if ! dpkg -l | grep -qw kali-anonsurf; then
echo "The package 'kali-anonsurf' did not install successfully."
exit 1
fi

exit 0
2 changes: 1 addition & 1 deletion kali-anonsurf-deb-src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: kali-anonsurf
Version: 1.2.3.0
Version: 1.2.3.1
Architecture: all
Maintainer: Und3rf10w
Installed-Size: 64
Expand Down
Loading