diff --git a/.github/workflows/publish_docs_to_wiki.yml b/.github/workflows/publish_docs_to_wiki.yml index 6d90624b2f..a41a49c2ea 100644 --- a/.github/workflows/publish_docs_to_wiki.yml +++ b/.github/workflows/publish_docs_to_wiki.yml @@ -9,9 +9,9 @@ on: - master # This can be changed to any branch of your preference env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication - USER_NAME: LKuemmel # Enter the username of your (bot) account - USER_EMAIL: lena.kuemmel@openwb.de # Enter the e-mail of your (bot) account + WIKI_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }} # Personal Access Token with repo scope + USER_NAME: "GitHub Actions" # Enter the username of your (bot) account + USER_EMAIL: "actions@github.com" # Enter the e-mail of your (bot) account OWNER: ${{ github.event.repository.owner.name }} # This is the repository owner REPOSITORY_NAME: ${{ github.event.repository.name }} # This is the repository name @@ -31,15 +31,15 @@ jobs: mkdir tmp_wiki cd tmp_wiki git init - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - git pull https://$GITHUB_TOKEN@github.com/$OWNER/$REPOSITORY_NAME.wiki.git + git pull https://$WIKI_TOKEN@github.com/$OWNER/$REPOSITORY_NAME.wiki.git # 4. Synchronize differences between `docs` & `tmp_wiki` # 5. Push new Wiki content - name: Push content to wiki run: | rsync -av --delete docs/ tmp_wiki/ --exclude .git cd tmp_wiki + git config user.name "$USER_NAME" + git config user.email "$USER_EMAIL" git add . - git commit -m "Update Wiki content" - git push -f --set-upstream https://$GITHUB_TOKEN@github.com/$OWNER/$REPOSITORY_NAME.wiki.git master + git commit -m "Update Wiki content" || echo "No changes to commit" + git push -f --set-upstream https://$WIKI_TOKEN@github.com/$OWNER/$REPOSITORY_NAME.wiki.git master diff --git a/docs/Neues Modul programmieren.md b/docs/Neues Modul programmieren.md index 8d0ec55180..cb8bed60ae 100644 --- a/docs/Neues Modul programmieren.md +++ b/docs/Neues Modul programmieren.md @@ -51,7 +51,7 @@ _Bei Fragen programmiert Ihr das SoC-Modul vorerst, wie Ihr es versteht, und ers Die Klasse `UpdateConfig` verwaltet automatische Migrationen bei Breaking Changes und neuen Einstellungen. Das System funktioniert folgendermaßen: - Für jede notwendige Anpassung wird eine nummerierte Upgrade-Funktion erstellt - Beim Systemstart werden alle noch nicht ausgeführten Upgrade-Funktionen automatisch aufgerufen -- Die Nummern der bereits ausgeführten Funktionen werden persistent gespeichert, um mehrfache Ausführung zu verhindern. Der aktuelle Migrations-Status wird im MQTT-Topic `openWB/system/datastore_version` veröffentlicht +- Die Nummern der bereits ausgeführten Funktionen werden persistent gespeichert, um mehrfache Ausführung zu verhindern. Der aktuelle Migrations-Status wird im MQTT-Topic `openWB/system/datastore_version` veröffentlicht. Alle Upgrade-Funktionen folgen einem einheitlichen Schema: ```python