Skip to content

MOTD update

MOTD update #563

name: "Generate motd for Linux OS"
on:
repository_dispatch:
types: ["MOTD update"]
concurrency:
group: redirector
cancel-in-progress: false
jobs:
jira:
runs-on: ubuntu-24.04
name: "Generate MOTD"
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
path: armbian.github.io
- name: Checkout repository
uses: actions/checkout@v5
with:
repository: "armbian/os"
fetch-depth: 0
path: os
- name: "Generate file"
run: |
cat os/motd.json | jq '.[] | .expiration,.message,.url' | xargs -n3 -d'\n' | sed -e 's/" "/|/' | sed "s/\"//g" > quotes.txt
# Get random application from armbion-config TBD: json structure needs primary field, so we only display top level info
# cat lib/armbian-config/config.jobs.json | jq -c '.menu[] | select(.id=="Software") .sub[] | select(.id=="Media") .sub[]' | shuf -n 1
- name: Commit changes if any
run: |
cd armbian.github.io
git checkout data
mkdir -p data/
mv ${{ github.workspace }}/quotes.txt data/
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add data/.
git diff --cached --quiet || git commit -m "Update WEB indes files"
git push
- name: "Run Bigin update action"
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: "Bigin update"