Skip to content

chore(ci): add dormant push-email notification workflow (#39) #103

chore(ci): add dormant push-email notification workflow (#39)

chore(ci): add dormant push-email notification workflow (#39) #103

Workflow file for this run

# // Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
# SPDX-License-Identifier: MPL-2.0
# Instant Forge Sync - Triggers propagation to all forges on push/release
name: Instant Sync
on:
push:
branches: [main, master]
release:
types: [published]
permissions:
contents: read
jobs:
dispatch:
runs-on: ubuntu-latest
timeout-minutes: 15
# Map the secret into job-level env so the presence gate works:
# `secrets` is not available inside `if:` (job or step) in GitHub
# Actions — only `env`/`vars` are. Gating on env.FARM_DISPATCH_TOKEN
# makes the missing-secret path a clean skip instead of a hard error.
env:
FARM_DISPATCH_TOKEN: ${{ secrets.FARM_DISPATCH_TOKEN }}
steps:
- name: Trigger Propagation
if: ${{ env.FARM_DISPATCH_TOKEN != '' }}
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v3
with:
token: ${{ env.FARM_DISPATCH_TOKEN }}
repository: hyperpolymath/.git-private-farm
event-type: propagate
client-payload: |-
{
"repo": "${{ github.event.repository.name }}",
"ref": "${{ github.ref }}",
"sha": "${{ github.sha }}",
"forges": ""
}
- name: Confirm
if: ${{ env.FARM_DISPATCH_TOKEN != '' }}
run: echo "::notice::Propagation triggered for ${{ github.event.repository.name }}"