diff --git a/.github/workflows/ci-laravel.yml b/.github/workflows/ci-laravel.yml index 40490ad..fa31932 100644 --- a/.github/workflows/ci-laravel.yml +++ b/.github/workflows/ci-laravel.yml @@ -87,3 +87,17 @@ jobs: php artisan key:generate - name: Tests (Pest) run: php artisan test + + # The one check the ruleset of main asks for in a repository that calls this workflow: "ci / ci" is green only when + # no job above failed or was cancelled (a skipped one is fine). 5-desarrollo/github.md of RASGO OS. + ci: + needs: [branch, app, laravel] + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Every job passed or was skipped + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + run: | + echo "Resultados: $RESULTS" + case " $RESULTS " in *" failure "*|*" cancelled "*) echo "Algún paso del CI ha fallado."; exit 1 ;; esac diff --git a/.github/workflows/ci-static.yml b/.github/workflows/ci-static.yml index 1e6dd90..efad55f 100644 --- a/.github/workflows/ci-static.yml +++ b/.github/workflows/ci-static.yml @@ -52,3 +52,17 @@ jobs: run: npm run build - name: Tests run: npm test --if-present + + # The one check the ruleset of main asks for in a repository that calls this workflow: "ci / ci" is green only when + # no job above failed or was cancelled (a skipped one is fine). 5-desarrollo/github.md of RASGO OS. + ci: + needs: [branch, node] + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Every job passed or was skipped + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + run: | + echo "Resultados: $RESULTS" + case " $RESULTS " in *" failure "*|*" cancelled "*) echo "Algún paso del CI ha fallado."; exit 1 ;; esac diff --git a/.github/workflows/ci-wordpress.yml b/.github/workflows/ci-wordpress.yml index 66eeeef..1c8e039 100644 --- a/.github/workflows/ci-wordpress.yml +++ b/.github/workflows/ci-wordpress.yml @@ -63,3 +63,17 @@ jobs: - name: Theme assets (if package.json exists) run: | if [ -f package.json ]; then npm ci && npm run build --if-present; fi + + # The one check the ruleset of main asks for in a repository that calls this workflow: "ci / ci" is green only when + # no job above failed or was cancelled (a skipped one is fine). 5-desarrollo/github.md of RASGO OS. + ci: + needs: [branch, wordpress] + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Every job passed or was skipped + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + run: | + echo "Resultados: $RESULTS" + case " $RESULTS " in *" failure "*|*" cancelled "*) echo "Algún paso del CI ha fallado."; exit 1 ;; esac diff --git a/README.md b/README.md index 682f7c7..9b65be7 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,6 @@ jobs: uses: rasgo-studio/.github/.github/workflows/ci-laravel.yml@main ``` -The branch check asks for the code of a Plane task and a number (`ACME01WEB-23-contact-form`), as -`5-desarrollo/github.md` says. This repository is public: no client name, host or secret goes in it. +Each shared workflow ends with a job `ci` that is green only when nothing above failed, so a calling repository +reports one check, `ci / ci`: the one its ruleset asks for. The branch check asks for the code of a Plane task and a +number (`ACME01WEB-23-contact-form`), as `5-desarrollo/github.md` says. This repository is public: no client name, host or secret goes in it.