When creating a new workflow on your repository, you will see templates originating from here. https://github.com/nextcloud/viewer/actions/new
For each template, you can propagate them on all the repos that use it.
- Go into https://github.com/nextcloud/.github/actions/workflows/dispatch-workflow.yml
- Enter the name of the workflow you want to dispatch
- Enter the page you want to execute (100 are done per page, so check the number of repositories, current is 260 so run for page: 1, 2 and 3)
- Wait for the actions to finish and see the checkout the pull requests
You can also run the following shell script on your machine to update all workflows of an app. It should be run inside the cloned repository of an app and requires rsync to be installed.
#!/bin/sh
# Update GitHub workflows from the Nextcloud template repository.
# This script is meant to be run from the root of the repository.
# Sanity check
[ ! -d ./.github/workflows/ ] && echo "Error: .github/workflows does not exist" && exit 1
# Clone template repository
temp="$(mktemp -d)"
git clone --depth=1 https://github.com/nextcloud/.github.git "$temp"
# Update workflows
rsync -vr \
--existing \
--include='*/' \
--include='*.yml' \
--exclude='*' \
"$temp/workflow-templates/" \
./.github/workflows/
# Cleanup
rm -rf "$temp"