Bulk Update Please #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bulk Update Please | |
on: | |
workflow_dispatch: | |
inputs: | |
topic: | |
type: choice | |
description: Target repositories with topic | |
required: true | |
default: backend | |
options: | |
- app | |
- backend | |
- dev | |
- io | |
- module | |
- org | |
- platform | |
- runtime | |
- service | |
- test | |
target: | |
type: choice | |
description: Target versions to upgrade to | |
required: true | |
default: minor | |
options: | |
- latest | |
- minor | |
- patch | |
package_filter: | |
type: string | |
description: Which packages to consider for update | |
required: true | |
default: "*" | |
jobs: | |
bulk-update-please: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Bulk Update Please | |
run: | | |
urls=$(gh repo list hedia-team --limit 1000 --topic="${TOPIC}" --no-archived --json=url --jq=".[] | .url") | |
echo "Running Update Please for the following repos:" | |
for url in $urls | |
do | |
echo "* $url" | |
gh workflow run --repo $url --raw-field target="${TARGET}" --raw-field package_filter="${PACKAGE_FILTER}" update-please.yml || true | |
done | |
echo " " | |
echo "Feel free to approve the PRs created by bulk-update-please once the checks have passed using bulk-approve-please!" | |
echo "https://github.com/hedia-team/.github/actions/workflows/bulk-approve-please.yml" | |
env: | |
GH_TOKEN: ${{ secrets.HEDIA_BOT_GITHUB_PAT }} | |
TOPIC: ${{ inputs.topic || 'backend' }} | |
TARGET: ${{ inputs.target || 'minor' }} | |
PACKAGE_FILTER: ${{ inputs.package_filter || '*' }} |