Skip to content

Nightly Builds

Nightly Builds #1607

Workflow file for this run

name: 'Nightly Builds'
on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *'
- cron: '0 20 * * *'
jobs:
check-for-updates:
name: 'Check for AdGuardHome Updates'
runs-on: ubuntu-latest
outputs:
updateAvailable: ${{ env.build_needed }}
steps:
- name: 'Check AdGuard Home Repository for Updates'
run: |
build_needed=0;
adguard_latest=$( git ls-remote --tags --refs --sort="v:refname" https://github.com/AdguardTeam/AdGuardHome.git | awk -F/ 'END{print$NF}' )
adwire_latest=$( curl -sL https://api.github.com/repos/iganeshk/adwireguard-dark/releases/latest | jq -r ".name" )
echo "AdGuardHome=${adguard_latest} vs AdWireGuard=${adwire_latest//-dark}"
if [ "$adwire_latest" == "null" ]
then
build_needed=1
else
curl -o ./semver2.sh -fsSL https://raw.githubusercontent.com/iganeshk/AdWireGuard-Dark/assets/semver2.sh
build_needed=$(bash ./semver2.sh ${adguard_latest} ${adwire_latest//-dark})
fi
if [ "$build_needed" == 1 ]
then
echo "New AdGuardHome - ${adguard_latest} build anticipated!"
else
echo "AdGuardHome - ${adwire_latest//-dark} is already latest!"
fi
echo "build_needed=${build_needed}" >> $GITHUB_ENV
build-adguardhome:
name: 'Build AdGuardHome Nightly'
needs: [check-for-updates]
if: ${{ needs.check-for-updates.outputs.updateAvailable == '1' }}
uses: ./.github/workflows/build.yml
secrets: inherit