Skip to content

Commit

Permalink
SapMachine #1544: Run wiki update task regularly
Browse files Browse the repository at this point in the history
  • Loading branch information
parttimenerd authored Nov 24, 2023
1 parent 17b5558 commit d856242
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/actions/update-wiki/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update Wiki

description: |
This action updates the wiki with the latest blog posts.
runs:
using: composite
steps:
- name: Update Wiki
run: |
git clone https://github.com/SAP/SapMachine.wiki.git
cd SapMachine.wiki
pip3 install feedparser
python3 scripts/update_blogs.py update > ../out
cat ../out
if grep -q changed ../out; then
git commit -a -m "Update blog posts"
git push
echo "Blog post list updated"
else
echo "No updates"
fi
working-directory: .
shell: bash
18 changes: 18 additions & 0 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Runs update-wiki update actions every day at 20:00 UTC

name: 'Wiki Update'

on:
workflow_dispatch:
schedule:
- cron: '0 20 * * *'

jobs:
wiki:
runs-on: ubuntu-latest
steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v4
- name: 'Update Wiki'
uses: ./.github/actions/update-wiki

0 comments on commit d856242

Please sign in to comment.