You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
924 B

name: Notify via Issue on Wiki Edit
on:
gollum:
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Generate wiki change message
run: |
sudo apt-get update && sudo apt-get install -y jq
echo "Wiki page edited" > wiki-change-msg.txt
echo "User: ${{ github.actor }}" >> wiki-change-msg.txt
echo "Time: $(date '+%Y-%m-%d %H:%M:%S')" >> wiki-change-msg.txt
echo "" >> wiki-change-msg.txt
cat "$GITHUB_EVENT_PATH"
jq -r '.pages // [] | .[] | "Page: \(.html_url) (action: \(.action))"' "$GITHUB_EVENT_PATH" >> wiki-change-msg.txt
- name: Create issue to notify Neilpang
uses: peter-evans/create-issue-from-file@v5
with:
title: "Wiki edited"
content-filepath: ./wiki-change-msg.txt
assignees: Neilpang
env:
TZ: Asia/Shanghai