mirror of
https://github.com/hhftechnology/Dock-Dploy.git
synced 2026-11-12 03:47:58 -06:00
40 lines
1.9 KiB
YAML
40 lines
1.9 KiB
YAML
# .github/workflows/forum-sync.yml — keeps this repo's GitHub issues AND discussions in sync with its category on forum.hhf.technology.
|
|
# Needs two repository secrets: FORUM_SYNC_TOKEN and FORUM_SYNC_URL (Settings → Secrets and variables → Actions). Already set on all 17 repos.
|
|
# Issue/discussion events always run the copy of this file on the DEFAULT branch, so it only takes effect once merged there.
|
|
# Never runs on push or pull_request, so it can't start builds or image jobs.
|
|
name: Forum sync
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, closed, reopened]
|
|
issue_comment:
|
|
types: [created]
|
|
discussion:
|
|
# GitHub Actions doesn't deliver discussion closed/reopened events (not valid activity types), so those aren't synced live.
|
|
types: [created, locked, unlocked, answered, unanswered]
|
|
discussion_comment:
|
|
types: [created]
|
|
|
|
jobs:
|
|
forum-sync:
|
|
# Issues. Skips PR comments and comments written by the forum sync itself (they carry the hhf-forum-sync marker).
|
|
if: ${{ (github.event_name == 'issues' || github.event_name == 'issue_comment') && !github.event.issue.pull_request && !contains(github.event.comment.body, 'hhf-forum-sync') }}
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
uses: hhftechnology/.github/.github/workflows/forum-sync.yml@main
|
|
secrets:
|
|
FORUM_SYNC_TOKEN: ${{ secrets.FORUM_SYNC_TOKEN }}
|
|
FORUM_SYNC_URL: ${{ secrets.FORUM_SYNC_URL }}
|
|
|
|
forum-sync-discussions:
|
|
# Discussions (only fires in repos that have Discussions turned on).
|
|
if: ${{ (github.event_name == 'discussion' || github.event_name == 'discussion_comment') && !contains(github.event.comment.body, 'hhf-forum-sync') }}
|
|
permissions:
|
|
contents: read
|
|
discussions: write
|
|
uses: hhftechnology/.github/.github/workflows/forum-sync-discussions.yml@main
|
|
secrets:
|
|
FORUM_SYNC_TOKEN: ${{ secrets.FORUM_SYNC_TOKEN }}
|
|
FORUM_SYNC_URL: ${{ secrets.FORUM_SYNC_URL }}
|