diff --git a/.github/workflows/callable-flex-update-test.yml b/.github/workflows/callable-flex-update-test.yml new file mode 100644 index 0000000..ad20f8f --- /dev/null +++ b/.github/workflows/callable-flex-update-test.yml @@ -0,0 +1,44 @@ +name: Update Flex endpoint + +on: + workflow_call: + inputs: + branch: + default: symfony-skeleton-test + required: false + type: string + +jobs: + flex-update: + name: Update Flex endpoint + runs-on: Ubuntu-20.04 + + steps: + - + name: Checkout + uses: actions/checkout@v4 + id: checkout + with: + fetch-depth: 0 + + - + name: Install tools + run: | + git config --global user.email "info@netgen.io" + git config --global user.name "Netgen 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: Update Flex endpoint + run: | + mkdir .github/flex-endpoint + git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} symfony-skeleton-test flex-test .github/flex-endpoint + git switch flex-test + git rm -q *.json + mv .github/flex-endpoint/*.json . + git add *.json + git commit -m 'Update Flex endpoint' || true + git push origin -f flex-test diff --git a/.github/workflows/callable-flex-update.yml b/.github/workflows/callable-flex-update.yml index 437dd8c..04465da 100644 --- a/.github/workflows/callable-flex-update.yml +++ b/.github/workflows/callable-flex-update.yml @@ -4,7 +4,7 @@ on: workflow_call: inputs: branch: - default: symfony-skeleton-test + default: master required: false type: string @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 id: checkout with: fetch-depth: 0 @@ -35,10 +35,10 @@ jobs: name: Update Flex endpoint run: | mkdir .github/flex-endpoint - git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} symfony-skeleton-test flex-test .github/flex-endpoint - git switch flex-test + git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} master flex .github/flex-endpoint + git switch flex git rm -q *.json mv .github/flex-endpoint/*.json . git add *.json git commit -m 'Update Flex endpoint' || true - git push origin -f flex-test + git push origin -f flex diff --git a/.github/workflows/flex-update-test.yml b/.github/workflows/flex-update-test.yml index 7dd70eb..58c580c 100644 --- a/.github/workflows/flex-update-test.yml +++ b/.github/workflows/flex-update-test.yml @@ -11,4 +11,4 @@ defaults: jobs: call-flex-update: - uses: netgen/recipes/.github/workflows/callable-flex-update.yml@symfony-skeleton-test + uses: netgen/recipes/.github/workflows/callable-flex-update-test.yml@symfony-skeleton-test