Skip to content

exception-codes

exception-codes #3013

name: exception-codes
# NOTE: Be carefully with renaming the workflow. If the workflow is renamed, adjust it
# in the `rendering.yaml` workflow_run definition
on:
schedule:
- cron: '15 */3 * * *'
# Allow manual triggering of this workflow
workflow_dispatch:
jobs:
exception-code-pages:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s composerInstall
- name: Collect exception code for new releases
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s updateExceptionCodesMissingTags -c
- name: Create missing exception code pages
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s createMissingExceptionCodeFiles -c
- name: List last 10 commits
if: ${{ steps.vars.outputs.t3d_has_changes }}
shell: bash
run: |
git log -n 10 --oneline
- name: Check for not pushed commits
shell: bash
id: check_changes
run: |
GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD)
UNPUSHED_COMMITS=$(git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH --oneline)
[[ -z "${UNPUSHED_COMMITS}" ]] && hasChanges=0
[[ -n "${UNPUSHED_COMMITS}" ]] && hasChanges=1
echo "has_changes=${hasChanges}" >> $GITHUB_OUTPUT
- name: Push committed changes
if: ${{ steps.check_changes.outputs.has_changes == 1 }}
shell: bash
run: |
git push