Skip to content

dispatch_readme

dispatch_readme #2

name: Dispatch README
on:
repository_dispatch:
types:
- dispatch_readme
jobs:
branches:
name: Get target branches
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
target_branch_array: ${{ steps.result.outputs.target_branch_array }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- id: result
name: Get target branches
run: |
echo '["base", ' > ./branch_list.json
git branch -r | grep ' origin/[A-Z][a-z]' | sed 's/ origin\//"/' | sed -z 's/\r//g; s/\n/", /g' | sed 's/, $//g' >> ./branch_list.json
echo ']' >> ./branch_list.json
echo target_branch_array=$(<./branch_list.json) >> $GITHUB_OUTPUT
- name: Remove temporary files
run: rm ./branch_list.json
generate:
name: Generate README
needs: branches
permissions:
contents: write
strategy:
matrix:
target-branch: ${{ fromJSON(needs.branches.outputs.target_branch_array) }}
uses: Gakuto1112/FiguraAvatarsReadmeTemplate/.github/workflows/generate_my_figura_avatar_readme.yml@main
with:
branch-name: ${{ matrix.target-branch }}