diff --git a/.github/actions/update-wiki/action.yml b/.github/actions/update-wiki/action.yml new file mode 100644 index 00000000000..3ed23d5f6ee --- /dev/null +++ b/.github/actions/update-wiki/action.yml @@ -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 diff --git a/.github/workflows/wiki.yml b/.github/workflows/wiki.yml new file mode 100644 index 00000000000..0d5a5b76c3b --- /dev/null +++ b/.github/workflows/wiki.yml @@ -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 +