Skip to content

Truongphikt updates all module #47

Truongphikt updates all module

Truongphikt updates all module #47

name: Update all modules and submodules
run-name: ${{ github.actor }} updates all module
on:
schedule:
- cron: '0 0 28-31 * *'
workflow_dispatch:
jobs:
list_module:
runs-on: ubuntu-20.04
outputs:
MODULE_LIST: ${{ steps.get_modules.outputs.MODULE_LIST }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get list all modules
id: get_modules
run: |
json_list=$(find ./*/ktest/* -maxdepth 0 -type d | sed 's/^.*\///g'| jq -R -s -c 'split("\n")')
echo "MODULE_LIST=$json_list" | tee -a "$GITHUB_OUTPUT"
update_module:
needs: list_module
strategy:
matrix:
module_list: ${{ fromJson(needs.list_module.outputs.MODULE_LIST) }}
uses: Truongphikt/kt-modules/.github/workflows/pull-module.yml@main
with:
repo_name: ${{ matrix.module_list }}
repo_type: module
secrets: inherit