mirror of
https://github.com/ipxe/ipxe.git
synced 2026-08-26 13:17:22 -05:00
Add a workflow that dispatches the synchronisation workflow in a repository-defined list of downstream forks. Signed-off-by: Michael Brown <mcb30@ipxe.org>
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Sync Forks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- synctest
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
|
|
sync:
|
|
name: Sync
|
|
runs-on: ubuntu-latest
|
|
if: vars.SYNC_FORKS
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
fork: ${{ fromJSON ( vars.SYNC_FORKS ) }}
|
|
env:
|
|
workflow_url: >-
|
|
${{ github.server_url }}/${{ matrix.fork.owner }}/${{ ''
|
|
}}${{ matrix.fork.repository }}/actions/workflows/syncrepo.yml
|
|
environment:
|
|
name: syncforks
|
|
url: ${{ env.workflow_url }}
|
|
|
|
steps:
|
|
|
|
- name: Get token
|
|
id: token
|
|
uses: actions/create-github-app-token@v3
|
|
with:
|
|
client-id: ${{ vars.WORKFLOW_DISPATCHER_ID }}
|
|
private-key: ${{ secrets.WORKFLOW_DISPATCHER_KEY }}
|
|
owner: ${{ matrix.fork.owner }}
|
|
repositories: ${{ matrix.fork.repository }}
|
|
|
|
- name: Dispatch
|
|
env:
|
|
GH_REPO: ${{ matrix.fork.owner }}/${{ matrix.fork.repository }}
|
|
GH_TOKEN: ${{ steps.token.outputs.token }}
|
|
run: |
|
|
gh workflow run syncrepo.yml
|
|
echo "Results at ${{ env.workflow_url }}"
|