summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-10-23 14:49:30 +0800
committertranch <tranch.xiao@gmail.com>2026-10-23 14:49:30 +0800
commit61cae516ec7097f9347e11b1e778001fa70912ca (patch)
tree58002c3ea9b5b5e0a9f6aa091084ef0e0f53debb /.github/workflows
parentfca1daca7dbe218dde1240b6c406a4257c70bd05 (diff)
downloadAeroCore-OS-61cae516ec7097f9347e11b1e778001fa70912ca.tar.gz
AeroCore-OS-61cae516ec7097f9347e11b1e778001fa70912ca.zip
ci: trigger Game Mode news after releasetesting-44.20261023.2testing
Dispatch the matching announcement branch after a release is generated. Skip the dispatch until a PAT is configured.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c662b02..404bdbd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -322,3 +322,40 @@ jobs:
with:
release_tag: ${{ needs.build_push.outputs.release_tag }}
handwritten: ${{ inputs.handwritten }}
+
+ kickoff_gamemode_news:
+ name: Refresh Game Mode announcements
+ needs: [generate_release]
+ if: github.ref_name == github.event.repository.default_branch || github.ref_name == 'testing'
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: read
+ steps:
+ - name: Resolve announcement branch
+ id: target
+ run: |
+ branch="${GITHUB_REF_NAME}"
+ [[ "${branch}" == "main" ]] && branch="stable"
+ echo "branch=${branch}" >> "$GITHUB_OUTPUT"
+
+ - name: Check dispatch token
+ id: token
+ env:
+ DISPATCH_PAT: ${{ secrets.PAT }}
+ run: |
+ if [[ -z "${DISPATCH_PAT}" ]]; then
+ echo "::warning::Skipping Game Mode announcements dispatch: configure the PAT secret."
+ echo "available=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "available=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Kickoff Game Mode announcements
+ if: steps.token.outputs.available == 'true'
+ uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
+ continue-on-error: true
+ with:
+ token: ${{ secrets.PAT }}
+ repository: AeroCore-IO/aerocore-os-gamemode-news
+ event-type: build-announcements
+ client-payload: '{"branch": "${{ steps.target.outputs.branch }}"}'