From 844d33f7866c41eb0d9e50f3ea3626ec64d564cd Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Tue, 26 Apr 2022 13:54:08 -0400 Subject: [PATCH] Adding a new callable recipes readme GH action --- .../callable-recipe-readme-update.yml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/callable-recipe-readme-update.yml diff --git a/.github/workflows/callable-recipe-readme-update.yml b/.github/workflows/callable-recipe-readme-update.yml new file mode 100644 index 00000000..99c531ab --- /dev/null +++ b/.github/workflows/callable-recipe-readme-update.yml @@ -0,0 +1,48 @@ +name: Update RECIPES.md + +on: + workflow_call: + inputs: + # branch where the RECIPES.md will be committed + branch: + required: true + type: string + contrib: + required: false + type: boolean + +jobs: + call-recipe-readme-update: + name: Update RECIPES.md + runs-on: Ubuntu-20.04 + + steps: + - + name: Checkout + uses: actions/checkout@v2 + id: checkout + with: + fetch-depth: 0 + + - + name: Install tools + run: | + git config --global user.email "" + git config --global user.name "github-action[bot]" + cd .github + wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main + unzip recipes-checker.zip + cd recipes-checker-main + composer install --ansi --no-dev + + - + name: Generate Recipes README + run: | + mkdir .github/recipe-readme + git switch flex/main + php .github/recipes-checker-main/run generate:recipes-readme index.json ${{ inputs.contrib && '--contrib' || '' }} > .github/recipe-readme/RECIPES.md + git switch ${{ inputs.branch }} + cp .github/recipe-readme/RECIPES.md RECIPES.md + git add RECIPES.md + git commit -m 'Update Recipes README' || true + git push origin ${{ inputs.branch }}