Skip to content

Daily Dependency Check #880

Daily Dependency Check

Daily Dependency Check #880

name: Daily Dependency Check
on:
schedule:
- cron: "0 0 * * *"
jobs:
artifacts:
name: Build Artifacts
if: "always() && github.repository == 'BetonQuest/BetonQuest'"
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
overwrite-settings: false
- name: Build with Maven
run: |
mvn -P Test-All -B package -DskipProjectSettings=true
docs:
name: Build Docs
if: "always() && github.repository == 'BetonQuest/BetonQuest'"
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v3
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- name: Install pngquant, a CI only dependency for mkdocs-material image optimization
uses: awalsh128/[email protected]
with:
packages: pngquant
- name: Select mkDocs requirements
run: |
[ -z $MKDOCS_MATERIAL_INSIDERS ] && TXT=docs-requirements.txt || TXT=docs-requirements-insiders.txt
echo "TXT=$TXT" >> $GITHUB_ENV
env:
MKDOCS_MATERIAL_INSIDERS: ${{ secrets.MKDOCS_MATERIAL_INSIDERS }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r ./config/$TXT
env:
MKDOCS_MATERIAL_INSIDERS: ${{ secrets.MKDOCS_MATERIAL_INSIDERS }}
- name: Build with mkdocs
run: |
if [ "$TXT" = "docs-requirements-insiders.txt" ]
then
mkdocs build --config-file mkdocs.insiders.yml
else
mkdocs build --config-file mkdocs.yml
fi
env:
ANALYTICS_PROPERTY: ${{ vars.ANALYTICS_PROPERTY }}
alert:
name: Alert to Discord
if: failure()
needs: [ artifacts, docs ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Publish to Discord
if: "always() && github.repository == 'BetonQuest/BetonQuest'"
run: |
bash .github/scripts/discord_cache_alert.sh
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}