Skip to content

Commit

Permalink
CI: Add GitHub Action CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
InterLinked1 committed Jan 4, 2024
1 parent 7ef5035 commit 85e28bb
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
vm:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a set of commands using the runners shell
- name: Start build
run: echo Beginning build
container:
runs-on: ubuntu-latest
container: debian:12
steps:
- name: Build Asterisk
run: |
cd /usr/src
apt-get update -y
apt-get install -y wget
wget https://docs.phreaknet.org/script/phreaknet.sh
chmod +x phreaknet.sh
./phreaknet.sh make
phreaknet update
phreaknet install --lightweight
/etc/init.d/asterisk restart
sleep 3
- name: Checkout
uses: actions/checkout@v2
- name: Build app_rpt
run: |
./rpt_install.sh
5 changes: 5 additions & 0 deletions rpt_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ make -j$(nproc) apps
make -j$(nproc) channels
make install

# Compilation failed
if [ $? -ne 0 ]; then
exit $?
fi

# If the rpt sounds don't exist yet, add them
if [ ! -d /var/lib/asterisk/sounds/en/rpt ]; then
printf "RPT sounds don't exist yet, adding them now...\n"
Expand Down

0 comments on commit 85e28bb

Please sign in to comment.