From 98845853e7fd0acbc311728c3f8db2f4d94d98cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 11:26:35 -0300 Subject: [PATCH 01/64] First test. --- .github/workflows/build.yaml | 68 +++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f1dfcd26f..7dfb0e0bf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -# See https://docs.github.com/en/actions. + name: Build on: @@ -15,26 +15,68 @@ jobs: runs-on: ubuntu-latest steps: - # See https://github.com/actions/checkout. - - name: Checkout doc-pt_br - uses: actions/checkout@v3 + + - name: Checkout doc-base + uses: actions/checkout@v7 with: - path: pt_br + repository: php/doc-base + path: doc-base - name: Checkout doc-en - uses: actions/checkout@v3 + uses: actions/checkout@v7 with: repository: php/doc-en path: en - - name: Checkout doc-base - uses: actions/checkout@v3 + - name: Checkout doc-pt_br (prev) + uses: actions/checkout@v7 with: - repository: php/doc-base - path: doc-base + path: pt_br_prev + + - name: Checkout doc-pt_br (next, one step) + uses: actions/checkout@v7 + with: + path: pt_br_next + ref: ${{ github.event.pull_request.head.sha }} + run: | + pwd + ls + git status + git remote -v + git log -1 + git rebase master + git log -1 + + - name: Checkout doc-pt_br (next, two step) + uses: actions/checkout@v7 + with: + path: pt_br + ref: ${{ github.event.pull_request.head.sha }} + + - name: Merge from main/master (always) + run: | + pwd + ls + + echo --- + echo '${{ toJson(github) }}' + + echo --- one + git status + git remote -v + git log -5 + gir pull --rebase master + git log -1 + + echo --- two + git -C pt_br status + git -C pt_br remote -v + git -C pt_br log -5 + gir -C pt_br pull --rebase master + git -C pt_br log -1 - - name: Quality Assurance scripts - run: php doc-base/scripts/qa/extensions.xml.php --check + - name: QA scripts + run: php doc-base/scripts/qa/extensions.xml.php --check - name: Build documentation for pt_br - run: php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br + run: php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 From f07d7cc17f2cc4482dc0e727b8fd352ede1efc3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 11:34:49 -0300 Subject: [PATCH 02/64] =?UTF-8?q?Coment=C3=A1rios=20necess=C3=A1rios=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7dfb0e0bf..c1b19ae76 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ - +# See https://docs.github.com/en/actions. name: Build on: @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - + # See https://github.com/actions/checkout. - name: Checkout doc-base uses: actions/checkout@v7 with: From 89e8bcf4b99a3bbb3cf615cf4f6a3e26696468ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 11:39:09 -0300 Subject: [PATCH 03/64] =?UTF-8?q?N=C3=A3o,=20o=20problema=20era=20run:=20.?= =?UTF-8?q?..=20com=20uses:=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c1b19ae76..b23e210d0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -# See https://docs.github.com/en/actions. + name: Build on: @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - # See https://github.com/actions/checkout. + - name: Checkout doc-base uses: actions/checkout@v7 with: @@ -38,7 +38,7 @@ jobs: with: path: pt_br_next ref: ${{ github.event.pull_request.head.sha }} - run: | + - run: | pwd ls git status From 2005c58967ff62751347e4e6963b617d3fd0fc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 11:48:33 -0300 Subject: [PATCH 04/64] =?UTF-8?q?Documenta=C3=A7=C3=A3o=20do=20actions/che?= =?UTF-8?q?ckout=20invalida=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b23e210d0..a430c8724 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,6 +16,17 @@ jobs: steps: + # Testando se a documentação da sintaxe de actions/checkout sequer é valida + # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token + + - uses: actions/checkout@v7 + - run: | + date + pwd + ls + git status + git remote -v + - name: Checkout doc-base uses: actions/checkout@v7 with: @@ -33,21 +44,7 @@ jobs: with: path: pt_br_prev - - name: Checkout doc-pt_br (next, one step) - uses: actions/checkout@v7 - with: - path: pt_br_next - ref: ${{ github.event.pull_request.head.sha }} - - run: | - pwd - ls - git status - git remote -v - git log -1 - git rebase master - git log -1 - - - name: Checkout doc-pt_br (next, two step) + - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 with: path: pt_br From bcb63f5af342ae3348052c3c47496cf7f6613a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 12:16:05 -0300 Subject: [PATCH 05/64] =?UTF-8?q?Doc=20v=C3=A1lida,=20mas=20onde=20estamos?= =?UTF-8?q?=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a430c8724..a2553c68f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,6 +16,11 @@ jobs: steps: + - name: Merge from main/master (always) + run: | + pwd + echo '${{ toJson(github) }}' + # Testando se a documentação da sintaxe de actions/checkout sequer é valida # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token @@ -55,21 +60,18 @@ jobs: pwd ls - echo --- - echo '${{ toJson(github) }}' - echo --- one git status git remote -v git log -5 - gir pull --rebase master + git pull --rebase master git log -1 echo --- two git -C pt_br status git -C pt_br remote -v git -C pt_br log -5 - gir -C pt_br pull --rebase master + git -C pt_br pull --rebase master git -C pt_br log -1 - name: QA scripts From adbbad0509695f553b4b2d4b5e5da99f04724496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 12:42:49 -0300 Subject: [PATCH 06/64] =?UTF-8?q?Doc=20v=C3=A1lida,=20mas=20onde=20estamos?= =?UTF-8?q?=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 53 +++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a2553c68f..7f70b99e7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,10 +16,8 @@ jobs: steps: - - name: Merge from main/master (always) - run: | - pwd - echo '${{ toJson(github) }}' + - name: pwd start + run: pwd # Testando se a documentação da sintaxe de actions/checkout sequer é valida # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token @@ -32,6 +30,9 @@ jobs: git status git remote -v + - name: pwd no param + run: pwd + - name: Checkout doc-base uses: actions/checkout@v7 with: @@ -49,6 +50,12 @@ jobs: with: path: pt_br_prev + - name: pwd with path + run: pwd + + - name: pwd after run + run: pwd + - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 with: @@ -57,22 +64,36 @@ jobs: - name: Merge from main/master (always) run: | + echo --- ONE pwd - ls - - echo --- one - git status - git remote -v - git log -5 - git pull --rebase master - git log -1 - - echo --- two + echo --- branch + git branch + echo --- status + git status + echo --- remote + git remote -v + echo --- log + git log -2 + echo --- pull/merge + # git pull --rebase master + # git log -2 + + echo --- TWO + pwd + echo --- branch + git -C pt_br branch + echo --- status + git -C pt_br status + echo --- remote + git -C pt_br remote -v + echo --- log + git -C pt_br log -2 + echo --- pull/merge git -C pt_br status git -C pt_br remote -v git -C pt_br log -5 - git -C pt_br pull --rebase master - git -C pt_br log -1 + # git -C pt_br pull --rebase master + # git -C pt_br log -2 - name: QA scripts run: php doc-base/scripts/qa/extensions.xml.php --check From 64842fcb7899882b07eae5099865508b6431d26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 12:59:28 -0300 Subject: [PATCH 07/64] Checkout Inception, the movie --- .github/workflows/build.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7f70b99e7..2207733d4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,13 @@ jobs: steps: - name: pwd start - run: pwd + run: | + echo -- start + pwd + ls + echo -- parent + pushd .. + ls # Testando se a documentação da sintaxe de actions/checkout sequer é valida # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token @@ -74,7 +80,7 @@ jobs: git remote -v echo --- log git log -2 - echo --- pull/merge + # echo --- pull/merge # git pull --rebase master # git log -2 @@ -91,7 +97,7 @@ jobs: echo --- pull/merge git -C pt_br status git -C pt_br remote -v - git -C pt_br log -5 + # echo --- pull/merge # git -C pt_br pull --rebase master # git -C pt_br log -2 From c98a469d14fefdca0cf2f9c9b71b1c96406adfe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 13:09:44 -0300 Subject: [PATCH 08/64] only to be sure... --- .github/workflows/build.yaml | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2207733d4..72debc1dc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,6 @@ jobs: build: name: Build runs-on: ubuntu-latest - steps: - name: pwd start @@ -21,8 +20,10 @@ jobs: echo -- start pwd ls - echo -- parent + echo -- pushd .. pushd .. + echo -- parent + pwd ls # Testando se a documentação da sintaxe de actions/checkout sequer é valida @@ -36,8 +37,10 @@ jobs: git status git remote -v - - name: pwd no param - run: pwd + - name: pwd ls + run:echo -- start + pwd + ls - name: Checkout doc-base uses: actions/checkout@v7 @@ -45,22 +48,31 @@ jobs: repository: php/doc-base path: doc-base + - name: pwd ls + run:echo -- start + pwd + ls + - name: Checkout doc-en uses: actions/checkout@v7 with: repository: php/doc-en path: en + - name: pwd ls + run:echo -- start + pwd + ls + - name: Checkout doc-pt_br (prev) uses: actions/checkout@v7 with: path: pt_br_prev - - name: pwd with path - run: pwd - - - name: pwd after run - run: pwd + - name: pwd ls + run:echo -- start + pwd + ls - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 @@ -94,9 +106,6 @@ jobs: git -C pt_br remote -v echo --- log git -C pt_br log -2 - echo --- pull/merge - git -C pt_br status - git -C pt_br remote -v # echo --- pull/merge # git -C pt_br pull --rebase master # git -C pt_br log -2 From 6675834b77f9a620de25699be26e4cc552fd9063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 13:11:35 -0300 Subject: [PATCH 09/64] only to be sure... 2 --- .github/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 72debc1dc..c2abc7271 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,5 @@ -name: Build +ame: Build on: push: @@ -38,7 +38,7 @@ jobs: git remote -v - name: pwd ls - run:echo -- start + run: pwd ls @@ -49,7 +49,7 @@ jobs: path: doc-base - name: pwd ls - run:echo -- start + run: pwd ls @@ -60,7 +60,7 @@ jobs: path: en - name: pwd ls - run:echo -- start + run: pwd ls @@ -70,7 +70,7 @@ jobs: path: pt_br_prev - name: pwd ls - run:echo -- start + run: pwd ls From 21c1efe11d3665918f6043f5ca48fceb89fb33a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 13:12:53 -0300 Subject: [PATCH 10/64] only to be sure... 3 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c2abc7271..da3b73bbd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,5 @@ -ame: Build +name: Check build on: push: From e021494aedab79a457f53faac88635126e5ec58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 14:02:44 -0300 Subject: [PATCH 11/64] only to be sure... 3 --- .github/workflows/build.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index da3b73bbd..c68286715 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -29,16 +29,8 @@ jobs: # Testando se a documentação da sintaxe de actions/checkout sequer é valida # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token - - uses: actions/checkout@v7 - - run: | - date - pwd - ls - git status - git remote -v - - name: pwd ls - run: + run: | pwd ls @@ -49,7 +41,7 @@ jobs: path: doc-base - name: pwd ls - run: + run: | pwd ls @@ -60,7 +52,7 @@ jobs: path: en - name: pwd ls - run: + run: | pwd ls @@ -70,7 +62,7 @@ jobs: path: pt_br_prev - name: pwd ls - run: + run: | pwd ls From bc500e3e1b35b2eae61b52b501aa6cec0c1d89a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 14:13:40 -0300 Subject: [PATCH 12/64] only to be sure... 5 --- .github/workflows/build.yaml | 37 ++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c68286715..3d61be10f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,11 +20,8 @@ jobs: echo -- start pwd ls - echo -- pushd .. - pushd .. echo -- parent - pwd - ls + ls .. # Testando se a documentação da sintaxe de actions/checkout sequer é valida # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token @@ -72,6 +69,11 @@ jobs: path: pt_br ref: ${{ github.event.pull_request.head.sha }} + - name: pwd ls + run: | + pwd + ls + - name: Merge from main/master (always) run: | echo --- ONE @@ -102,6 +104,33 @@ jobs: # git -C pt_br pull --rebase master # git -C pt_br log -2 + # Testando pushd modifica caminho permanentemente + + - name: pwd pushd pwd + run: | + echo ONE + pwd + ls + pushd .. + echo ONE + pwd + ls + + - name: pwd ls + run: | + pwd + ls + + # Testando para onde o cd puro vai + + - name: cd pwd + run: | + cd + pwd + + - name: env + run: env + - name: QA scripts run: php doc-base/scripts/qa/extensions.xml.php --check From 4f52f6676b73c2cfe07fdbdbc9185a1543dab763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 14:21:07 -0300 Subject: [PATCH 13/64] only to be sure... 6 --- .github/workflows/build.yaml | 45 ++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3d61be10f..c6fd16247 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,12 +15,13 @@ jobs: runs-on: ubuntu-latest steps: - - name: pwd start + - name: start state run: | - echo -- start + echo -- start pwd pwd + echo -- start ls ls - echo -- parent + echo -- parent ls ls .. # Testando se a documentação da sintaxe de actions/checkout sequer é valida @@ -28,7 +29,9 @@ jobs: - name: pwd ls run: | + echo -- pwd pwd + echo -- ls ls - name: Checkout doc-base @@ -39,7 +42,9 @@ jobs: - name: pwd ls run: | + echo -- pwd pwd + echo -- ls ls - name: Checkout doc-en @@ -50,7 +55,9 @@ jobs: - name: pwd ls run: | + echo -- pwd pwd + echo -- ls ls - name: Checkout doc-pt_br (prev) @@ -60,7 +67,9 @@ jobs: - name: pwd ls run: | + echo -- pwd pwd + echo -- ls ls - name: Checkout doc-pt_br (next) @@ -71,25 +80,13 @@ jobs: - name: pwd ls run: | + echo -- pwd pwd + echo -- ls ls - name: Merge from main/master (always) run: | - echo --- ONE - pwd - echo --- branch - git branch - echo --- status - git status - echo --- remote - git remote -v - echo --- log - git log -2 - # echo --- pull/merge - # git pull --rebase master - # git log -2 - echo --- TWO pwd echo --- branch @@ -104,6 +101,20 @@ jobs: # git -C pt_br pull --rebase master # git -C pt_br log -2 + echo --- ONE + pwd + echo --- branch + git branch + echo --- status + git status + echo --- remote + git remote -v + echo --- log + git log -2 + # echo --- pull/merge + # git pull --rebase master + # git log -2 + # Testando pushd modifica caminho permanentemente - name: pwd pushd pwd From 14d7ce7f2c2904b22cedc8afcc4225a8e7cd1a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 14:25:48 -0300 Subject: [PATCH 14/64] Finally, merge tests --- .github/workflows/build.yaml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c6fd16247..8b2fbf6dd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -87,7 +87,7 @@ jobs: - name: Merge from main/master (always) run: | - echo --- TWO + echo --- pwd pwd echo --- branch git -C pt_br branch @@ -97,26 +97,15 @@ jobs: git -C pt_br remote -v echo --- log git -C pt_br log -2 - # echo --- pull/merge - # git -C pt_br pull --rebase master - # git -C pt_br log -2 - - echo --- ONE - pwd - echo --- branch - git branch - echo --- status - git status - echo --- remote - git remote -v - echo --- log - git log -2 - # echo --- pull/merge - # git pull --rebase master - # git log -2 + echo --- pull/merge + git -C pt_br pull --rebase origin master + git -C pt_br log -2 # Testando pushd modifica caminho permanentemente + - name: ls doc-base/temp + run: lsdoc-base/temp + - name: pwd pushd pwd run: | echo ONE From 5770f0d1e23eda80dd6bf44e8684372c51a0c5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 14:50:21 -0300 Subject: [PATCH 15/64] Now with squash merge --- .github/workflows/build.yaml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8b2fbf6dd..ea9f7b243 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,17 +15,17 @@ jobs: runs-on: ubuntu-latest steps: - - name: start state + - name: pwd ls run: | - echo -- start pwd + echo -- pwd pwd - echo -- start ls + echo -- ls ls - echo -- parent ls - ls .. - # Testando se a documentação da sintaxe de actions/checkout sequer é valida - # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token + # Testando checkout sem parâmtros conflita com checkout com parâmetros + + - name: Checkout sem parâmetros + uses: actions/checkout@v7 - name: pwd ls run: | @@ -60,6 +60,9 @@ jobs: echo -- ls ls + # Acima, lista mudou? Documentar. + + - name: Checkout doc-pt_br (prev) uses: actions/checkout@v7 with: @@ -72,6 +75,8 @@ jobs: echo -- ls ls + # Checkout PR branch, unmerged + - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 with: @@ -85,6 +90,8 @@ jobs: echo -- ls ls + # Checkout main/master, and then squash and merge the branch in here + - name: Merge from main/master (always) run: | echo --- pwd @@ -96,10 +103,14 @@ jobs: echo --- remote git -C pt_br remote -v echo --- log - git -C pt_br log -2 - echo --- pull/merge - git -C pt_br pull --rebase origin master - git -C pt_br log -2 + git -C pt_br log -10 --oneline + + echo --- checkout master, by name + git -C pt_br checkout ${{ github.event.pull_request.base.ref }} + echo --- merge squash, by sha + git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} + + git -C pt_br log -10 --oneline # Testando pushd modifica caminho permanentemente From 59fec937297dd81c18c7794daccdf760cb0368a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 14:54:53 -0300 Subject: [PATCH 16/64] Fixing checkout master --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ea9f7b243..9403bd1b9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -106,7 +106,8 @@ jobs: git -C pt_br log -10 --oneline echo --- checkout master, by name - git -C pt_br checkout ${{ github.event.pull_request.base.ref }} + echo git -C pt_br checkout origin ${{ github.event.pull_request.base.ref }} + git -C pt_br checkout origin ${{ github.event.pull_request.base.ref }} echo --- merge squash, by sha git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} From f6ffce2a1e970d35343e181324884055d93e359d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:02:37 -0300 Subject: [PATCH 17/64] Fixing pathspec not know, take 1 --- .github/workflows/build.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9403bd1b9..7b6b5222a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -80,6 +80,7 @@ jobs: - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 with: + fetch-depth: 0 path: pt_br ref: ${{ github.event.pull_request.head.sha }} @@ -105,9 +106,14 @@ jobs: echo --- log git -C pt_br log -10 --oneline + # echo --- fetch master + # echo git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + # git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + echo --- checkout master, by name echo git -C pt_br checkout origin ${{ github.event.pull_request.base.ref }} git -C pt_br checkout origin ${{ github.event.pull_request.base.ref }} + echo --- merge squash, by sha git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} From 48073bcf5492afe24047eddf7ed7fda2f2a3543c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:04:45 -0300 Subject: [PATCH 18/64] Fixing pathspec not know, take 2 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7b6b5222a..00a328a48 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -80,7 +80,7 @@ jobs: - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 with: - fetch-depth: 0 + fetch-tags: true path: pt_br ref: ${{ github.event.pull_request.head.sha }} From 0b21f31bb6e4c5c75ad07a7c4c45c98930f8e325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:07:15 -0300 Subject: [PATCH 19/64] Fixing pathspec not know, take 3 --- .github/workflows/build.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 00a328a48..00656f070 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -80,7 +80,6 @@ jobs: - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 with: - fetch-tags: true path: pt_br ref: ${{ github.event.pull_request.head.sha }} @@ -106,9 +105,9 @@ jobs: echo --- log git -C pt_br log -10 --oneline - # echo --- fetch master - # echo git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} - # git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + echo --- fetch master + echo git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} echo --- checkout master, by name echo git -C pt_br checkout origin ${{ github.event.pull_request.base.ref }} From 6ddcc65dc3506a796b3284de82405916b003802f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:09:55 -0300 Subject: [PATCH 20/64] Fixing pathspec not know, take 4 --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 00656f070..f87c436cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -110,8 +110,8 @@ jobs: git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} echo --- checkout master, by name - echo git -C pt_br checkout origin ${{ github.event.pull_request.base.ref }} - git -C pt_br checkout origin ${{ github.event.pull_request.base.ref }} + echo git -C pt_br checkout ${{ github.event.pull_request.base.ref }} + git -C pt_br checkout ${{ github.event.pull_request.base.ref }} echo --- merge squash, by sha git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} From fbcf206e93dd64e00b46fa45d31d23c2d2d747cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:18:34 -0300 Subject: [PATCH 21/64] Trying to pull everything, take 1 --- .github/workflows/build.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f87c436cb..b71887797 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -80,6 +80,8 @@ jobs: - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 with: + fetch-depth: 0 + fetch-tags: true path: pt_br ref: ${{ github.event.pull_request.head.sha }} @@ -103,15 +105,14 @@ jobs: echo --- remote git -C pt_br remote -v echo --- log - git -C pt_br log -10 --oneline + git -C pt_br log -40 --oneline - echo --- fetch master - echo git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} - git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + echo --- fetch main line + git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} echo --- checkout master, by name - echo git -C pt_br checkout ${{ github.event.pull_request.base.ref }} - git -C pt_br checkout ${{ github.event.pull_request.base.ref }} + git -C pt_br checkout ${{ github.event.pull_request.base.ref }} + git -C pt_br log -5 --oneline echo --- merge squash, by sha git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} From a0a71f7cf54d1127a83f721549afc3bd44ec234b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:27:13 -0300 Subject: [PATCH 22/64] Minimization, take 1 --- .github/workflows/build.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b71887797..f2ce1b109 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -105,24 +105,28 @@ jobs: echo --- remote git -C pt_br remote -v echo --- log - git -C pt_br log -40 --oneline + git -C pt_br log -10 --oneline - echo --- fetch main line - git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + # echo --- fetch main line + # git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} echo --- checkout master, by name git -C pt_br checkout ${{ github.event.pull_request.base.ref }} - git -C pt_br log -5 --oneline + git -C pt_br log -10 --oneline - echo --- merge squash, by sha - git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} + echo --- merge squash, by name + git -C pt_br merge --squash ${{ github.event.pull_request.head.ref }} git -C pt_br log -10 --oneline + echo --- status + git -C pt_br status + echo --- diff + git -C pt_br diff # Testando pushd modifica caminho permanentemente - name: ls doc-base/temp - run: lsdoc-base/temp + run: ls pt_br/doc-base/temp - name: pwd pushd pwd run: | From 0f52363c715322d59f8b354a805eb34342d54231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:30:42 -0300 Subject: [PATCH 23/64] Minimization, take 2 --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f2ce1b109..a1a3be1f2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -83,7 +83,7 @@ jobs: fetch-depth: 0 fetch-tags: true path: pt_br - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.ref }} - name: pwd ls run: | @@ -114,8 +114,8 @@ jobs: git -C pt_br checkout ${{ github.event.pull_request.base.ref }} git -C pt_br log -10 --oneline - echo --- merge squash, by name - git -C pt_br merge --squash ${{ github.event.pull_request.head.ref }} + echo --- merge squash, by sha + git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} git -C pt_br log -10 --oneline echo --- status From 423d97c346e34572d2cfdaa0f0272f031cacff13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:38:12 -0300 Subject: [PATCH 24/64] Minimization, take 3 --- .github/workflows/build.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a1a3be1f2..0b4874ae0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -83,7 +83,7 @@ jobs: fetch-depth: 0 fetch-tags: true path: pt_br - ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.event.pull_request.head.sha }} - name: pwd ls run: | @@ -105,10 +105,8 @@ jobs: echo --- remote git -C pt_br remote -v echo --- log - git -C pt_br log -10 --oneline - - # echo --- fetch main line - # git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + # echo --- fetch + # git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} echo --- checkout master, by name git -C pt_br checkout ${{ github.event.pull_request.base.ref }} From 128afd3ce161a0f98693e48f815721d11f7863bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 15:45:22 -0300 Subject: [PATCH 25/64] Minimization, take 4 --- .github/workflows/build.yaml | 45 +++++++++++++++++------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0b4874ae0..ecd772f4b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,5 @@ -name: Check build +name: Build on: push: @@ -96,30 +96,27 @@ jobs: - name: Merge from main/master (always) run: | - echo --- pwd - pwd - echo --- branch - git -C pt_br branch - echo --- status - git -C pt_br status - echo --- remote - git -C pt_br remote -v - echo --- log - # echo --- fetch - # git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} - - echo --- checkout master, by name - git -C pt_br checkout ${{ github.event.pull_request.base.ref }} - git -C pt_br log -10 --oneline - - echo --- merge squash, by sha - git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} - - git -C pt_br log -10 --oneline - echo --- status - git -C pt_br status + cd pt_br + + # echo --- fetch + # git fetch origin ${{ github.event.pull_request.base.ref }} + + echo --- checkout brach, by name + git checkout ${{ github.event.pull_request.head.ref }} + git log -3 --oneline + + echo --- checkout master, by name + git checkout ${{ github.event.pull_request.base.ref }} + git log -3 --oneline + + echo --- merge squash, by sha + git merge --squash ${{ github.event.pull_request.head.sha }} + git log -3 --oneline + + echo --- status + git status echo --- diff - git -C pt_br diff + git diff # Testando pushd modifica caminho permanentemente From 4883cb0b28838f7889925bd23eeb3e2993bf2414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 16:10:35 -0300 Subject: [PATCH 26/64] Minimization, take 5 --- .github/workflows/build.yaml | 41 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ecd772f4b..281dffcae 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,18 +15,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: pwd ls - run: | - echo -- pwd - pwd - echo -- ls - ls - - # Testando checkout sem parâmtros conflita com checkout com parâmetros - - - name: Checkout sem parâmetros - uses: actions/checkout@v7 - - name: pwd ls run: | echo -- pwd @@ -60,9 +48,6 @@ jobs: echo -- ls ls - # Acima, lista mudou? Documentar. - - - name: Checkout doc-pt_br (prev) uses: actions/checkout@v7 with: @@ -75,7 +60,7 @@ jobs: echo -- ls ls - # Checkout PR branch, unmerged + # Checkout branch, unmerged - name: Checkout doc-pt_br (next) uses: actions/checkout@v7 @@ -97,12 +82,21 @@ jobs: - name: Merge from main/master (always) run: | cd pt_br - - # echo --- fetch - # git fetch origin ${{ github.event.pull_request.base.ref }} - - echo --- checkout brach, by name - git checkout ${{ github.event.pull_request.head.ref }} + git remote -v + git show-ref -d --head + git show-ref -d --branches --tags + echo + + echo --- fetch + git fetch origin ${{ github.event.pull_request.base.ref }} + echo + git fetch origin ${{ github.event.pull_request.head.sha }} + echo + git fetch origin ${{ github.event.pull_request.head.ref }} + echo + + echo --- give the detached head a name + git switch -c detached-${{ github.event.pull_request.head.sha }} git log -3 --oneline echo --- checkout master, by name @@ -115,8 +109,9 @@ jobs: echo --- status git status - echo --- diff + echo --- diff git diff + echo --- # Testando pushd modifica caminho permanentemente From fa92ba23203d60a30f6b9a7b790438cb6f4366fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 16:13:40 -0300 Subject: [PATCH 27/64] Minimization, take 6 --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 281dffcae..16d6e7a39 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -81,7 +81,9 @@ jobs: - name: Merge from main/master (always) run: | - cd pt_br + set -x + cd pt_br + git remote -v git show-ref -d --head git show-ref -d --branches --tags From 6d09b9d6f58e1203d89f9a654ed7bfac69a76543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 16:15:45 -0300 Subject: [PATCH 28/64] Minimization, take 7 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 16d6e7a39..941764c3c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -86,7 +86,7 @@ jobs: git remote -v git show-ref -d --head - git show-ref -d --branches --tags + git show-ref -d --tags echo echo --- fetch From 9a81a130e546fae81d038ef1d8b95f1be52eac6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 16:18:03 -0300 Subject: [PATCH 29/64] GH git does not like show-ref -d --tags --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 941764c3c..abc52a1cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -84,9 +84,9 @@ jobs: set -x cd pt_br + git --version git remote -v git show-ref -d --head - git show-ref -d --tags echo echo --- fetch From 74b1527c8d3af04f368d6f010a50fe3e5ced3332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 16:28:17 -0300 Subject: [PATCH 30/64] Knowing know refs/names --- .github/workflows/build.yaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index abc52a1cb..d632e46da 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -77,25 +77,32 @@ jobs: echo -- ls ls - # Checkout main/master, and then squash and merge the branch in here + + # Fetches, checkout, and merge know SHAs + # + # Master/main is: refs/remotes/origin/master, FETCH_HEAD (after fetch) + # PR branch is: HEAD + # + # Fetch by github.event.pull_request.head.ref does not work. - name: Merge from main/master (always) run: | - set -x + git --version cd pt_br - git --version + echo -- before git remote -v git show-ref -d --head - echo - echo --- fetch git fetch origin ${{ github.event.pull_request.base.ref }} echo git fetch origin ${{ github.event.pull_request.head.sha }} + echo -- after + git remote -v + git show-ref -d --head echo - git fetch origin ${{ github.event.pull_request.head.ref }} - echo + + set -x echo --- give the detached head a name git switch -c detached-${{ github.event.pull_request.head.sha }} From 9aa60fc59a17ec67af13d046d89c8c41b1276a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 16:50:26 -0300 Subject: [PATCH 31/64] Clean ups --- .github/workflows/build.yaml | 69 +++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d632e46da..d45f5361f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -78,54 +78,59 @@ jobs: ls - # Fetches, checkout, and merge know SHAs + # Fetches, checkout, and merge know names. # - # Master/main is: refs/remotes/origin/master, FETCH_HEAD (after fetch) - # PR branch is: HEAD + # - github.event.pull_request.base.ref : main/master + # - github.event.pull_request.head.sha : PR head + # + # Does not work: + # - Fetch by github.event.pull_request.head.ref # - # Fetch by github.event.pull_request.head.ref does not work. - name: Merge from main/master (always) run: | git --version - cd pt_br - echo -- before - git remote -v - git show-ref -d --head - echo --- fetch - git fetch origin ${{ github.event.pull_request.base.ref }} - echo - git fetch origin ${{ github.event.pull_request.head.sha }} - echo -- after - git remote -v - git show-ref -d --head + # Give the detached head a name, to avoid warnings + git -C pt_br switch -c detached-${{ github.event.pull_request.head.sha }} echo - set -x - - echo --- give the detached head a name - git switch -c detached-${{ github.event.pull_request.head.sha }} - git log -3 --oneline + # Fetch history of two points to be rebased (necessary?) + git -C pt_br remote -v + git -C pt_br show-ref -d --head + echo + git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + echo + git -C pt_br fetch origin ${{ github.event.pull_request.head.sha }} + echo + git -C pt_br remote -v + git -C pt_br show-ref -d --head + echo - echo --- checkout master, by name - git checkout ${{ github.event.pull_request.base.ref }} - git log -3 --oneline + # Checkout main/master, by name, to reaach it's last commit + git -C pt_br checkout ${{ github.event.pull_request.base.ref }} + echo - echo --- merge squash, by sha - git merge --squash ${{ github.event.pull_request.head.sha }} - git log -3 --oneline + # Squash and merge, from the branch SHA + git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} + git -C pt_br log -3 --oneline + echo - echo --- status - git status - echo --- diff - git diff + git -C pt_br status + echo + git -C pt_br diff echo --- - # Testando pushd modifica caminho permanentemente + cd pt_br + + # Testando cs modifica caminho permanentemten - name: ls doc-base/temp - run: ls pt_br/doc-base/temp + run: | + pwd + ls pt_br/doc-base/temp + + # Testando pushd modifica caminho permanentemente - name: pwd pushd pwd run: | From e95d6ed5c5d983f543c2914c25a96c5632340cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 17:18:59 -0300 Subject: [PATCH 32/64] More clean ups --- .github/workflows/build.yaml | 80 +++++++++++------------------------- 1 file changed, 23 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d45f5361f..764164dd9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,54 +15,29 @@ jobs: runs-on: ubuntu-latest steps: - - name: pwd ls - run: | - echo -- pwd - pwd - echo -- ls - ls - - name: Checkout doc-base uses: actions/checkout@v7 with: repository: php/doc-base path: doc-base - - name: pwd ls - run: | - echo -- pwd - pwd - echo -- ls - ls - - name: Checkout doc-en uses: actions/checkout@v7 with: repository: php/doc-en path: en - - name: pwd ls - run: | - echo -- pwd - pwd - echo -- ls - ls + # GH actions/checkout, automaticaly merges, but tends to get stuck in the past. + # See: https://github.com/php/doc-base/pull/329 - - name: Checkout doc-pt_br (prev) + - name: Checkout doc-pt_br (automatic merge) uses: actions/checkout@v7 with: path: pt_br_prev - - name: pwd ls - run: | - echo -- pwd - pwd - echo -- ls - ls + # Naked checkout - # Checkout branch, unmerged - - - name: Checkout doc-pt_br (next) + - name: Checkout doc-pt_br (no merge) uses: actions/checkout@v7 with: fetch-depth: 0 @@ -70,14 +45,6 @@ jobs: path: pt_br ref: ${{ github.event.pull_request.head.sha }} - - name: pwd ls - run: | - echo -- pwd - pwd - echo -- ls - ls - - # Fetches, checkout, and merge know names. # # - github.event.pull_request.base.ref : main/master @@ -85,50 +52,49 @@ jobs: # # Does not work: # - Fetch by github.event.pull_request.head.ref - # + # - ?? without fetch-depth / fetch-tags - name: Merge from main/master (always) run: | git --version + cd pt_br + # Give the detached head a name, to avoid warnings - git -C pt_br switch -c detached-${{ github.event.pull_request.head.sha }} + git switch -c detached-${{ github.event.pull_request.head.sha }} echo - # Fetch history of two points to be rebased (necessary?) - git -C pt_br remote -v - git -C pt_br show-ref -d --head - echo - git -C pt_br fetch origin ${{ github.event.pull_request.base.ref }} + # Fetch history of two points, for rebase tree walking (necessary?) + git fetch origin ${{ github.event.pull_request.base.ref }} echo - git -C pt_br fetch origin ${{ github.event.pull_request.head.sha }} + git fetch origin ${{ github.event.pull_request.head.sha }} echo - git -C pt_br remote -v - git -C pt_br show-ref -d --head + git remote -v + git show-ref -d --head echo # Checkout main/master, by name, to reaach it's last commit - git -C pt_br checkout ${{ github.event.pull_request.base.ref }} + git checkout ${{ github.event.pull_request.base.ref }} echo # Squash and merge, from the branch SHA - git -C pt_br merge --squash ${{ github.event.pull_request.head.sha }} - git -C pt_br log -3 --oneline + git merge --squash ${{ github.event.pull_request.head.sha }} echo - git -C pt_br status + git status --short + echo + git diff --stat echo - git -C pt_br diff - echo --- - - cd pt_br # Testando cs modifica caminho permanentemten - name: ls doc-base/temp run: | pwd - ls pt_br/doc-base/temp + echo + ls + echo + ls doc-base/temp # Testando pushd modifica caminho permanentemente From 16362e9faa406cef1d93af7009f6faa0b1351194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 17:44:13 -0300 Subject: [PATCH 33/64] More more clean ups --- .github/workflows/build.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 764164dd9..fc4895028 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -56,23 +56,23 @@ jobs: - name: Merge from main/master (always) run: | + # Merging from know current, know names/SHAS. git --version - + echo " at" cd pt_br - - # Give the detached head a name, to avoid warnings - git switch -c detached-${{ github.event.pull_request.head.sha }} + pwd echo # Fetch history of two points, for rebase tree walking (necessary?) - git fetch origin ${{ github.event.pull_request.base.ref }} - echo - git fetch origin ${{ github.event.pull_request.head.sha }} - echo - git remote -v + git fetch -q origin ${{ github.event.pull_request.base.ref }} + git fetch -q origin ${{ github.event.pull_request.head.sha }} git show-ref -d --head echo + # Give the detached head a name, to avoid warnings + git switch -c commit-${{ github.event.pull_request.head.sha }} + echo + # Checkout main/master, by name, to reaach it's last commit git checkout ${{ github.event.pull_request.base.ref }} echo @@ -82,7 +82,6 @@ jobs: echo git status --short - echo git diff --stat echo From 7c5fafbc9d9a2ebeafec5b98f3dee7276d903bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 18:04:47 -0300 Subject: [PATCH 34/64] Clean up, test without fetch- params --- .github/workflows/build.yaml | 92 +++++++++++------------------------- 1 file changed, 28 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fc4895028..25b5b927c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,43 +27,45 @@ jobs: repository: php/doc-en path: en - # GH actions/checkout, automaticaly merges, but tends to get stuck in the past. - # See: https://github.com/php/doc-base/pull/329 + # GH actions/checkout, automatically merges, but tends to get stuck in the past. + # See: https://github.com/php/doc-base/pull/329 - name: Checkout doc-pt_br (automatic merge) uses: actions/checkout@v7 with: - path: pt_br_prev + path: pt_br + + - name: Build manual.xml + run: | + php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 + sha1sum doc-base/temp/manual.xml - # Naked checkout + + + - name: Alternative path, uses userland merge instead + run: rm -rf pt_br - name: Checkout doc-pt_br (no merge) uses: actions/checkout@v7 with: - fetch-depth: 0 - fetch-tags: true path: pt_br ref: ${{ github.event.pull_request.head.sha }} - # Fetches, checkout, and merge know names. - # - # - github.event.pull_request.base.ref : main/master - # - github.event.pull_request.head.sha : PR head - # - # Does not work: - # - Fetch by github.event.pull_request.head.ref - # - ?? without fetch-depth / fetch-tags - - - name: Merge from main/master (always) + - name: Userland merge run: | - # Merging from know current, know names/SHAS. - git --version - echo " at" - cd pt_br - pwd + # Merge into main/master from current, known names/SHAS. + # + # - github.event.pull_request.base.ref : main/master + # - github.event.pull_request.head.sha : PR head + # + # Does not work: + # - Fetch by github.event.pull_request.head.ref + # - ?? without fetch-depth / fetch-tags echo - # Fetch history of two points, for rebase tree walking (necessary?) + cd pt_br + + # Fetch history of two points, for merge tree walking (necessary?) git fetch -q origin ${{ github.event.pull_request.base.ref }} git fetch -q origin ${{ github.event.pull_request.head.sha }} git show-ref -d --head @@ -73,7 +75,7 @@ jobs: git switch -c commit-${{ github.event.pull_request.head.sha }} echo - # Checkout main/master, by name, to reaach it's last commit + # Checkout main/master, by name, to reach it's last commit git checkout ${{ github.event.pull_request.base.ref }} echo @@ -85,45 +87,7 @@ jobs: git diff --stat echo - # Testando cs modifica caminho permanentemten - - - name: ls doc-base/temp - run: | - pwd - echo - ls - echo - ls doc-base/temp - - # Testando pushd modifica caminho permanentemente - - - name: pwd pushd pwd - run: | - echo ONE - pwd - ls - pushd .. - echo ONE - pwd - ls - - - name: pwd ls + - name: Build manual.xml, again run: | - pwd - ls - - # Testando para onde o cd puro vai - - - name: cd pwd - run: | - cd - pwd - - - name: env - run: env - - - name: QA scripts - run: php doc-base/scripts/qa/extensions.xml.php --check - - - name: Build documentation for pt_br - run: php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 + php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 + sha1sum doc-base/temp/manual.xml From 272c37e437ba8257c286bc77fd61500953c287ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 18:10:05 -0300 Subject: [PATCH 35/64] without fetch- fail, and with, but without git fetch? --- .github/workflows/build.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 25b5b927c..0fb137dda 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -48,6 +48,8 @@ jobs: - name: Checkout doc-pt_br (no merge) uses: actions/checkout@v7 with: + fetch-depth: 0 + fetch-tags: true path: pt_br ref: ${{ github.event.pull_request.head.sha }} @@ -59,15 +61,15 @@ jobs: # - github.event.pull_request.head.sha : PR head # # Does not work: - # - Fetch by github.event.pull_request.head.ref - # - ?? without fetch-depth / fetch-tags + # - actions/checkout without fetch-depth / fetch-tags + # - git fetch by github.event.pull_request.head.ref echo cd pt_br # Fetch history of two points, for merge tree walking (necessary?) - git fetch -q origin ${{ github.event.pull_request.base.ref }} - git fetch -q origin ${{ github.event.pull_request.head.sha }} + # git fetch -q origin ${{ github.event.pull_request.base.ref }} + # git fetch -q origin ${{ github.event.pull_request.head.sha }} git show-ref -d --head echo From 155d50db16fb97360f78fdf0ff4db3cf3aeb526f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 29 Jul 2026 18:22:29 -0300 Subject: [PATCH 36/64] Minimized. --- .github/workflows/build.yaml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0fb137dda..f4481a308 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,7 @@ jobs: # GH actions/checkout, automatically merges, but tends to get stuck in the past. # See: https://github.com/php/doc-base/pull/329 - - name: Checkout doc-pt_br (automatic merge) + - name: Checkout and merge doc-pt_br uses: actions/checkout@v7 with: path: pt_br @@ -45,7 +45,7 @@ jobs: - name: Alternative path, uses userland merge instead run: rm -rf pt_br - - name: Checkout doc-pt_br (no merge) + - name: Checkout doc-pt_br uses: actions/checkout@v7 with: fetch-depth: 0 @@ -53,9 +53,9 @@ jobs: path: pt_br ref: ${{ github.event.pull_request.head.sha }} - - name: Userland merge + - name: Merge doc-pt_br run: | - # Merge into main/master from current, known names/SHAS. + # Merge into main/master from *current* names/SHAS. # # - github.event.pull_request.base.ref : main/master # - github.event.pull_request.head.sha : PR head @@ -63,13 +63,8 @@ jobs: # Does not work: # - actions/checkout without fetch-depth / fetch-tags # - git fetch by github.event.pull_request.head.ref - echo cd pt_br - - # Fetch history of two points, for merge tree walking (necessary?) - # git fetch -q origin ${{ github.event.pull_request.base.ref }} - # git fetch -q origin ${{ github.event.pull_request.head.sha }} git show-ref -d --head echo @@ -77,7 +72,7 @@ jobs: git switch -c commit-${{ github.event.pull_request.head.sha }} echo - # Checkout main/master, by name, to reach it's last commit + # Checkout main/master, by name, to always reach it's last commit git checkout ${{ github.event.pull_request.base.ref }} echo From b5a78b54431589b80709dd430bee9a7581061397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 5 Aug 2026 18:51:18 -0300 Subject: [PATCH 37/64] Set anonymous ident, so merge --squash does not fail --- .github/workflows/build.yaml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f4481a308..5ea7c3a1c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,6 +45,15 @@ jobs: - name: Alternative path, uses userland merge instead run: rm -rf pt_br + # Merge into main/master from *current* names/SHAS. + # + # - github.event.pull_request.base.ref : main/master + # - github.event.pull_request.head.sha : PR head + # + # Does not work: + # - actions/checkout without fetch-depth / fetch-tags + # - git fetch by github.event.pull_request.head.ref + - name: Checkout doc-pt_br uses: actions/checkout@v7 with: @@ -53,31 +62,23 @@ jobs: path: pt_br ref: ${{ github.event.pull_request.head.sha }} - - name: Merge doc-pt_br + - name: Squash and merge doc-pt_br run: | - # Merge into main/master from *current* names/SHAS. - # - # - github.event.pull_request.base.ref : main/master - # - github.event.pull_request.head.sha : PR head - # - # Does not work: - # - actions/checkout without fetch-depth / fetch-tags - # - git fetch by github.event.pull_request.head.ref cd pt_br git show-ref -d --head echo # Give the detached head a name, to avoid warnings - git switch -c commit-${{ github.event.pull_request.head.sha }} + git switch -c head-${{ github.event.pull_request.head.sha }} echo - # Checkout main/master, by name, to always reach it's last commit + # Checkout default branch by name, to always get the current head git checkout ${{ github.event.pull_request.base.ref }} echo - # Squash and merge, from the branch SHA - git merge --squash ${{ github.event.pull_request.head.sha }} + # Squash and merge, from the PR branch head SHA + git -c user.name="nobody" -c user.email="nobody@example.com" merge --squash ${{ github.event.pull_request.head.sha }} echo git status --short From c885fb58f481b3d404a25721136b55e4c0287f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 5 Aug 2026 19:20:17 -0300 Subject: [PATCH 38/64] Add a second test, trying to minimize the git command --- .github/workflows/build.yaml | 44 ++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5ea7c3a1c..c741d0920 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -62,7 +62,7 @@ jobs: path: pt_br ref: ${{ github.event.pull_request.head.sha }} - - name: Squash and merge doc-pt_br + - name: Squash merge doc-pt_br run: | cd pt_br @@ -77,7 +77,7 @@ jobs: git checkout ${{ github.event.pull_request.base.ref }} echo - # Squash and merge, from the PR branch head SHA + # Squash merge, from the PR branch head SHA git -c user.name="nobody" -c user.email="nobody@example.com" merge --squash ${{ github.event.pull_request.head.sha }} echo @@ -89,3 +89,43 @@ jobs: run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 sha1sum doc-base/temp/manual.xml + + + + + + + - name: Extra alternative, --no-commit avoids ident error? + run: rm -rf pt_br + + - name: Checkout doc-pt_br + uses: actions/checkout@v7 + with: + fetch-depth: 0 + fetch-tags: true + path: pt_br + ref: ${{ github.event.pull_request.head.sha }} + + - name: Squash merge doc-pt_br + run: | + + cd pt_br + git show-ref -d --head + echo + + # Give the detached head a name, to avoid warnings + git switch -c head-${{ github.event.pull_request.head.sha }} + echo + + # Checkout default branch by name, to always get the current head + git checkout ${{ github.event.pull_request.base.ref }} + echo + + # Squash merge, from the PR branch head SHA + git merge --squash --no-commit ${{ github.event.pull_request.head.sha }} + git -c user.name="none" -c user.email="none@example.com" commit -m "Squash merge" + echo + + git status --short + git diff --stat + echo From ecfe89b0c82fdad2bc007a81f0abafd47c0c6b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 5 Aug 2026 20:01:03 -0300 Subject: [PATCH 39/64] Add a third test, as --no-commit is suspect --- .github/workflows/build.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c741d0920..1d37b1a49 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -113,15 +113,23 @@ jobs: git show-ref -d --head echo - # Give the detached head a name, to avoid warnings - git switch -c head-${{ github.event.pull_request.head.sha }} + # Give the PR detached head a name, to avoid warnings + git branch -c head-${{ github.event.pull_request.head.sha }} echo # Checkout default branch by name, to always get the current head git checkout ${{ github.event.pull_request.base.ref }} echo - # Squash merge, from the PR branch head SHA + # Squash and "merge" changes from the PR branch, v1, -c + git -c user.name="none" -c user.email="none@example.com" merge -q --squash ${{ github.event.pull_request.head.sha }} + git -c user.name="none" -c user.email="none@example.com" commit -m "Squash merge" + echo + + git reset --hard HEAD~1 + echo + + # Squash and "merge" changes from the PR branch, v2, --no-commit git merge --squash --no-commit ${{ github.event.pull_request.head.sha }} git -c user.name="none" -c user.email="none@example.com" commit -m "Squash merge" echo From da903e34fd94570b730179c12fb4a1199bded636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 5 Aug 2026 20:08:32 -0300 Subject: [PATCH 40/64] Extra -c --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1d37b1a49..19c06e960 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -114,7 +114,7 @@ jobs: echo # Give the PR detached head a name, to avoid warnings - git branch -c head-${{ github.event.pull_request.head.sha }} + git branch head-${{ github.event.pull_request.head.sha }} echo # Checkout default branch by name, to always get the current head From b34c905227578b70feb9f76764c520c3a6155cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 5 Aug 2026 20:57:52 -0300 Subject: [PATCH 41/64] Minimized --- .github/workflows/build.yaml | 67 ++++++++---------------------------- 1 file changed, 14 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 19c06e960..bcd155310 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -53,6 +53,13 @@ jobs: # Does not work: # - actions/checkout without fetch-depth / fetch-tags # - git fetch by github.event.pull_request.head.ref + # - git merge --squash --no-commit fails with no ident + # + # TODO: + # - In case of conflict, GH's 'Squash and merge' uses + # --strategy-option=theirs or ours? Probably theirs + # in this case, as we position into master ("here") + # and pulls from feature ("there"). - name: Checkout doc-pt_br uses: actions/checkout@v7 @@ -64,21 +71,23 @@ jobs: - name: Squash merge doc-pt_br run: | + # Squash merge cd pt_br git show-ref -d --head echo - # Give the detached head a name, to avoid warnings - git switch -c head-${{ github.event.pull_request.head.sha }} - echo + # Give the PR detached head a name, to avoid warnings + git branch head-${{ github.event.pull_request.head.sha }} # Checkout default branch by name, to always get the current head git checkout ${{ github.event.pull_request.base.ref }} echo - # Squash merge, from the PR branch head SHA - git -c user.name="nobody" -c user.email="nobody@example.com" merge --squash ${{ github.event.pull_request.head.sha }} + # Squash changes from the PR branch into here (default branch) + # TODO: missing a --strategy-option=theirs on merge --squash ? + git -c user.name="none" -c user.email="none@example.com" merge -q --squash ${{ github.event.pull_request.head.sha }} + git -c user.name="none" -c user.email="none@example.com" commit -m "Squash merge" echo git status --short @@ -89,51 +98,3 @@ jobs: run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 sha1sum doc-base/temp/manual.xml - - - - - - - - name: Extra alternative, --no-commit avoids ident error? - run: rm -rf pt_br - - - name: Checkout doc-pt_br - uses: actions/checkout@v7 - with: - fetch-depth: 0 - fetch-tags: true - path: pt_br - ref: ${{ github.event.pull_request.head.sha }} - - - name: Squash merge doc-pt_br - run: | - - cd pt_br - git show-ref -d --head - echo - - # Give the PR detached head a name, to avoid warnings - git branch head-${{ github.event.pull_request.head.sha }} - echo - - # Checkout default branch by name, to always get the current head - git checkout ${{ github.event.pull_request.base.ref }} - echo - - # Squash and "merge" changes from the PR branch, v1, -c - git -c user.name="none" -c user.email="none@example.com" merge -q --squash ${{ github.event.pull_request.head.sha }} - git -c user.name="none" -c user.email="none@example.com" commit -m "Squash merge" - echo - - git reset --hard HEAD~1 - echo - - # Squash and "merge" changes from the PR branch, v2, --no-commit - git merge --squash --no-commit ${{ github.event.pull_request.head.sha }} - git -c user.name="none" -c user.email="none@example.com" commit -m "Squash merge" - echo - - git status --short - git diff --stat - echo From 518328629ab3932698e9e92ff5767d88f656bbe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Fri, 7 Aug 2026 23:50:54 -0300 Subject: [PATCH 42/64] Alternative in plain git --- .github/workflows/build.yaml | 58 ++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bcd155310..fffa63820 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,7 +27,7 @@ jobs: repository: php/doc-en path: en - # GH actions/checkout, automatically merges, but tends to get stuck in the past. + # GH actions/checkout automatically merges, but tends to get stuck in the past. # See: https://github.com/php/doc-base/pull/329 - name: Checkout and merge doc-pt_br @@ -42,7 +42,59 @@ jobs: - - name: Alternative path, uses userland merge instead + + # Merge PR brahcn into default branch using *current* branch heads: + # - github.event.pull_request.base.ref : main/master + # - github.event.pull_request.head.sha : PR head + # + # Does not work: + # - actions/checkout without fetch-depth / fetch-tags + # - git fetch by github.event.pull_request.head.ref + # - git merge --squash --no-commit fails with no ident + # + # TODO: + # - In case of conflict, GH's 'Squash and merge' uses + # --strategy-option=theirs or ours? Probably theirs + # in this case, as we position into master ("here") + # and pulls from feature ("there"). + + + + + - name: Alternative 1, uses plain git commands + run: rm -rf pt_br + + - name: Checkout and merge doc-pt_br (plain git) + run: | + # Plain git merge + + path=pt_br + repo=${{ event.repository.ssh_url }} + hash=${{ github.event.pull_request.head.sha }} + + git clone -q --single-branch $repo $path + cd $path + + git fetch -q --no-tags --prune --no-recurse-submodules origin $hash + echo + git remote -v + echo + git show-ref -d --head + echo + + git config user.name "nobody" + git config user.email "nobody@example.com" + + git merge -m "Merge" $hash + + - name: Build manual.xml, again + run: | + php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 + sha1sum doc-base/temp/manual.xml + + + + - name: Alternative 2, uses actions/checkout@v7 + userland merge run: rm -rf pt_br # Merge into main/master from *current* names/SHAS. @@ -61,7 +113,7 @@ jobs: # in this case, as we position into master ("here") # and pulls from feature ("there"). - - name: Checkout doc-pt_br + - name: Checkout and merge doc-pt_br (actions/checkout+userland) uses: actions/checkout@v7 with: fetch-depth: 0 From 2f9f2d88aa9643a2ccd2d737aa79d9e49a2b8922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Fri, 7 Aug 2026 23:53:39 -0300 Subject: [PATCH 43/64] fix --- .github/workflows/build.yaml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fffa63820..7d188facb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -67,9 +67,10 @@ jobs: - name: Checkout and merge doc-pt_br (plain git) run: | # Plain git merge + git --version path=pt_br - repo=${{ event.repository.ssh_url }} + repo=${{ github.event.repository.ssh_url }} hash=${{ github.event.pull_request.head.sha }} git clone -q --single-branch $repo $path @@ -97,22 +98,6 @@ jobs: - name: Alternative 2, uses actions/checkout@v7 + userland merge run: rm -rf pt_br - # Merge into main/master from *current* names/SHAS. - # - # - github.event.pull_request.base.ref : main/master - # - github.event.pull_request.head.sha : PR head - # - # Does not work: - # - actions/checkout without fetch-depth / fetch-tags - # - git fetch by github.event.pull_request.head.ref - # - git merge --squash --no-commit fails with no ident - # - # TODO: - # - In case of conflict, GH's 'Squash and merge' uses - # --strategy-option=theirs or ours? Probably theirs - # in this case, as we position into master ("here") - # and pulls from feature ("there"). - - name: Checkout and merge doc-pt_br (actions/checkout+userland) uses: actions/checkout@v7 with: From 728263e7877eef4c21d56f8018bb3042cf430682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 00:03:32 -0300 Subject: [PATCH 44/64] repo url --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7d188facb..e16ed637e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -70,7 +70,7 @@ jobs: git --version path=pt_br - repo=${{ github.event.repository.ssh_url }} + repo=${{ github.event.pull_request.base.repo.clone_url }} hash=${{ github.event.pull_request.head.sha }} git clone -q --single-branch $repo $path From 946abaf233711f4f2bad44460b8ff5e17d328367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 00:16:46 -0300 Subject: [PATCH 45/64] Minimization --- .github/workflows/build.yaml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e16ed637e..03ca70929 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,7 @@ jobs: # GH actions/checkout automatically merges, but tends to get stuck in the past. # See: https://github.com/php/doc-base/pull/329 - - name: Checkout and merge doc-pt_br + - name: Checkout doc-pt_br uses: actions/checkout@v7 with: path: pt_br @@ -64,29 +64,21 @@ jobs: - name: Alternative 1, uses plain git commands run: rm -rf pt_br - - name: Checkout and merge doc-pt_br (plain git) + - name: Checkout doc-pt_br (plain git) run: | # Plain git merge git --version path=pt_br - repo=${{ github.event.pull_request.base.repo.clone_url }} - hash=${{ github.event.pull_request.head.sha }} - git clone -q --single-branch $repo $path - cd $path - - git fetch -q --no-tags --prune --no-recurse-submodules origin $hash - echo - git remote -v - echo - git show-ref -d --head + git clone --single-branch ${{ github.event.pull_request.base.repo.clone_url }} "$path" + cd "$path" echo - git config user.name "nobody" git config user.email "nobody@example.com" - - git merge -m "Merge" $hash + git fetch --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + echo + git merge -m "Merge" ${{ github.event.pull_request.head.sha }} - name: Build manual.xml, again run: | @@ -98,7 +90,7 @@ jobs: - name: Alternative 2, uses actions/checkout@v7 + userland merge run: rm -rf pt_br - - name: Checkout and merge doc-pt_br (actions/checkout+userland) + - name: Checkout doc-pt_br (actions/checkout no merge) uses: actions/checkout@v7 with: fetch-depth: 0 From 90ca91b208da22c3c30e7e15c2ff7353f2951a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 00:44:27 -0300 Subject: [PATCH 46/64] Clean up --- .github/workflows/build.yaml | 83 +++++------------------------------- 1 file changed, 11 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 03ca70929..1204fff6a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,7 @@ jobs: # GH actions/checkout automatically merges, but tends to get stuck in the past. # See: https://github.com/php/doc-base/pull/329 - - name: Checkout doc-pt_br + - name: Checkout doc-pt_br (actions/checkout) uses: actions/checkout@v7 with: path: pt_br @@ -40,88 +40,27 @@ jobs: php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 sha1sum doc-base/temp/manual.xml - - - - # Merge PR brahcn into default branch using *current* branch heads: - # - github.event.pull_request.base.ref : main/master - # - github.event.pull_request.head.sha : PR head - # - # Does not work: - # - actions/checkout without fetch-depth / fetch-tags - # - git fetch by github.event.pull_request.head.ref - # - git merge --squash --no-commit fails with no ident - # - # TODO: - # - In case of conflict, GH's 'Squash and merge' uses - # --strategy-option=theirs or ours? Probably theirs - # in this case, as we position into master ("here") - # and pulls from feature ("there"). - - - - - - name: Alternative 1, uses plain git commands + - name: Alternative run: rm -rf pt_br + # Clone default branch and merge PR using only plain git: + # - clone --single-branch selects the default branch; + # - github.event.pull_request.head.sha maps to PR tip, unmerged. + - name: Checkout doc-pt_br (plain git) run: | # Plain git merge - git --version path=pt_br - git clone --single-branch ${{ github.event.pull_request.base.repo.clone_url }} "$path" + set -x + git --version + git clone -q --single-branch ${{ github.event.pull_request.base.repo.clone_url }} "$path" cd "$path" - echo git config user.name "nobody" git config user.email "nobody@example.com" - git fetch --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} - echo - git merge -m "Merge" ${{ github.event.pull_request.head.sha }} - - - name: Build manual.xml, again - run: | - php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 - sha1sum doc-base/temp/manual.xml - - - - - name: Alternative 2, uses actions/checkout@v7 + userland merge - run: rm -rf pt_br - - - name: Checkout doc-pt_br (actions/checkout no merge) - uses: actions/checkout@v7 - with: - fetch-depth: 0 - fetch-tags: true - path: pt_br - ref: ${{ github.event.pull_request.head.sha }} - - - name: Squash merge doc-pt_br - run: | - # Squash merge - - cd pt_br - git show-ref -d --head - echo - - # Give the PR detached head a name, to avoid warnings - git branch head-${{ github.event.pull_request.head.sha }} - - # Checkout default branch by name, to always get the current head - git checkout ${{ github.event.pull_request.base.ref }} - echo - - # Squash changes from the PR branch into here (default branch) - # TODO: missing a --strategy-option=theirs on merge --squash ? - git -c user.name="none" -c user.email="none@example.com" merge -q --squash ${{ github.event.pull_request.head.sha }} - git -c user.name="none" -c user.email="none@example.com" commit -m "Squash merge" - echo - - git status --short - git diff --stat - echo + git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git merge -q -m "Merge" ${{ github.event.pull_request.head.sha }} - name: Build manual.xml, again run: | From 5258d6d58c99148c07dd282a3194107553305bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 10:12:57 -0300 Subject: [PATCH 47/64] Separate old and new --- .github/workflows/build.yaml | 31 ++++----------------- .github/workflows/buildxml.yaml | 48 +++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/buildxml.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1204fff6a..ec45fa8a8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,29 +40,8 @@ jobs: php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 sha1sum doc-base/temp/manual.xml - - name: Alternative - run: rm -rf pt_br - - # Clone default branch and merge PR using only plain git: - # - clone --single-branch selects the default branch; - # - github.event.pull_request.head.sha maps to PR tip, unmerged. - - - name: Checkout doc-pt_br (plain git) - run: | - # Plain git merge - - path=pt_br - - set -x - git --version - git clone -q --single-branch ${{ github.event.pull_request.base.repo.clone_url }} "$path" - cd "$path" - git config user.name "nobody" - git config user.email "nobody@example.com" - git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} - git merge -q -m "Merge" ${{ github.event.pull_request.head.sha }} - - - name: Build manual.xml, again - run: | - php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 - sha1sum doc-base/temp/manual.xml + echo + cd pr_br + git config --local --list + echo + env diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml new file mode 100644 index 000000000..98c03882e --- /dev/null +++ b/.github/workflows/buildxml.yaml @@ -0,0 +1,48 @@ + +name: Build manual.xml t1 + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Build manual.xml t2 + runs-on: ubuntu-latest + steps: + + # Clone default branches and merge PR using only plain git: + # + # - clone --single-branch selects the default branch; + # - clone --depth=1 downloads the same data as actions/checkout; + # - github.event.pull_request.head.sha maps to PR tip, unmerged. + # + # Avoids getting stuck in the past, like actions/checkout does, and + # we do not need any auth stuff for building the manual. So the results + # of workflow re-runs always match with results of normal or squash + # merging the pull requests. + + - name: Set up files + run: | + # Checkout repositories + git --version + git clone -q --single-branch --depth=1 https://github.com/php/doc-base.git doc-base + git clone -q --single-branch --depth=1 https://github.com/php/doc-en.git en + git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br + run: | + # Merge pull request + set -x + cd pt_br + git config user.name "nobody" + git config user.email "nobody@example.com" + git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git merge -q -m "Merge" ${{ github.event.pull_request.head.sha }} + + - name: Build manual.xml + run: | + php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 + sha1sum doc-base/temp/manual.xml From 87bb25e8b73ee769866424a701a2a31dec9494e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 10:18:24 -0300 Subject: [PATCH 48/64] Fixes --- .github/workflows/build.yaml | 2 +- .github/workflows/buildxml.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ec45fa8a8..5172b7af5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,7 +41,7 @@ jobs: sha1sum doc-base/temp/manual.xml echo - cd pr_br + cd pt_br git config --local --list echo env diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 98c03882e..1cf3b6068 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -33,8 +33,10 @@ jobs: git clone -q --single-branch --depth=1 https://github.com/php/doc-base.git doc-base git clone -q --single-branch --depth=1 https://github.com/php/doc-en.git en git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br + + - name: Merge pull request run: | - # Merge pull request + # Plain git merge set -x cd pt_br git config user.name "nobody" From 3719ef9b8999785725f91c7e43013799aaa3d177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 10:35:57 -0300 Subject: [PATCH 49/64] verbosity --- .github/workflows/build.yaml | 4 +--- .github/workflows/buildxml.yaml | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5172b7af5..8793ad88d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,6 +42,4 @@ jobs: echo cd pt_br - git config --local --list - echo - env + git show $GITHUB_REF diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 1cf3b6068..a6baca91a 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -30,9 +30,10 @@ jobs: run: | # Checkout repositories git --version - git clone -q --single-branch --depth=1 https://github.com/php/doc-base.git doc-base - git clone -q --single-branch --depth=1 https://github.com/php/doc-en.git en - git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br + set -x + git clone --single-branch --depth=1 https://github.com/php/doc-base.git doc-base + git clone --single-branch --depth=1 https://github.com/php/doc-en.git en + git clone --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | From 1f7f2688a618661a5225a06cb78e6b9d522a414f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 10:41:47 -0300 Subject: [PATCH 50/64] verbosity --- .github/workflows/build.yaml | 3 ++- .github/workflows/buildxml.yaml | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8793ad88d..37dbe70ad 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,8 +38,9 @@ jobs: - name: Build manual.xml run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 + echo sha1sum doc-base/temp/manual.xml echo cd pt_br - git show $GITHUB_REF + git show $GITHUB_SHA diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index a6baca91a..578baaf9c 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -1,5 +1,5 @@ -name: Build manual.xml t1 +name: Build XML on: push: @@ -11,7 +11,7 @@ on: jobs: build: - name: Build manual.xml t2 + name: Run configure runs-on: ubuntu-latest steps: @@ -31,9 +31,9 @@ jobs: # Checkout repositories git --version set -x - git clone --single-branch --depth=1 https://github.com/php/doc-base.git doc-base - git clone --single-branch --depth=1 https://github.com/php/doc-en.git en - git clone --single-branch https://github.com/php/doc-pt_br.git pt_br + git -q clone --single-branch --depth=1 https://github.com/php/doc-base.git doc-base + git -q clone --single-branch --depth=1 https://github.com/php/doc-en.git en + git -q clone --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -48,4 +48,5 @@ jobs: - name: Build manual.xml run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 + echo sha1sum doc-base/temp/manual.xml From 9653b304479600152bee5e7e20daaacb5baddda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 11:18:11 -0300 Subject: [PATCH 51/64] trying to recreate identical result --- .github/workflows/build.yaml | 4 ---- .github/workflows/buildxml.yaml | 25 +++++++++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 37dbe70ad..6b9e019fb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,7 +40,3 @@ jobs: php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 echo sha1sum doc-base/temp/manual.xml - - echo - cd pt_br - git show $GITHUB_SHA diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 578baaf9c..6af2ace2b 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -21,29 +21,38 @@ jobs: # - clone --depth=1 downloads the same data as actions/checkout; # - github.event.pull_request.head.sha maps to PR tip, unmerged. # - # Avoids getting stuck in the past, like actions/checkout does, and + # Avoids getting stuck in the past, like GH actions/checkout does, and # we do not need any auth stuff for building the manual. So the results # of workflow re-runs always match with results of normal or squash - # merging the pull requests. + # merging the pull requests, immediately after a workflow re-run. + # + # To be pedantic clear, Github's pull requests only merge the PRs on the + # "synchronize" event. That does *not* include workflows re-runs. So in + # busy repositories, the results of CI checks are almost always outdated + # and invalid, not representing the future state of the default branch + # after the pull request is merged, even after workflows re-runs. - name: Set up files run: | # Checkout repositories git --version set -x - git -q clone --single-branch --depth=1 https://github.com/php/doc-base.git doc-base - git -q clone --single-branch --depth=1 https://github.com/php/doc-en.git en - git -q clone --single-branch https://github.com/php/doc-pt_br.git pt_br + git clone -q --single-branch --depth=1 https://github.com/php/doc-base.git doc-base + git clone -q --single-branch --depth=1 https://github.com/php/doc-en.git en + git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | # Plain git merge set -x cd pt_br - git config user.name "nobody" - git config user.email "nobody@example.com" + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} - git merge -q -m "Merge" ${{ github.event.pull_request.head.sha }} + #git merge -q --message "Merge" ${{ github.event.pull_request.head.sha }} + git merge -q --no-edit ${{ github.event.pull_request.head.sha }} + + git show - name: Build manual.xml run: | From 1924ec2c3c2adb82b9bbf6d31069b2a742eb7e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 11:36:31 -0300 Subject: [PATCH 52/64] Identical message --- .github/workflows/buildxml.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 6af2ace2b..7def63e0c 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -35,8 +35,8 @@ jobs: - name: Set up files run: | # Checkout repositories - git --version set -x + git --version git clone -q --single-branch --depth=1 https://github.com/php/doc-base.git doc-base git clone -q --single-branch --depth=1 https://github.com/php/doc-en.git en git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br @@ -46,11 +46,15 @@ jobs: # Plain git merge set -x cd pt_br + git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + headsha=$(git rev-parse HEAD) + message="Merge ${{ github.event.pull_request.head.sha }} into ${headsha}" + git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} - #git merge -q --message "Merge" ${{ github.event.pull_request.head.sha }} - git merge -q --no-edit ${{ github.event.pull_request.head.sha }} + git merge -q --message "$message" ${{ github.event.pull_request.head.sha }} git show From ee87668538be9715ac58c74cfe951009bd9abc1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 11:55:01 -0300 Subject: [PATCH 53/64] Minimize --- .github/workflows/buildxml.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 7def63e0c..a25907237 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -36,7 +36,6 @@ jobs: run: | # Checkout repositories set -x - git --version git clone -q --single-branch --depth=1 https://github.com/php/doc-base.git doc-base git clone -q --single-branch --depth=1 https://github.com/php/doc-en.git en git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br @@ -44,20 +43,18 @@ jobs: - name: Merge pull request run: | # Plain git merge - set -x cd pt_br git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + mainsha=$(git rev-parse HEAD) + message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" - headsha=$(git rev-parse HEAD) - message="Merge ${{ github.event.pull_request.head.sha }} into ${headsha}" - + set -x + pwd git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --message "$message" ${{ github.event.pull_request.head.sha }} - git show - - name: Build manual.xml run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 From b0093e65798df83dd38ad2314dc1f5b2e6ed6bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 12:21:10 -0300 Subject: [PATCH 54/64] faster? --- .github/workflows/buildxml.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index a25907237..6d0217f9b 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -19,7 +19,9 @@ jobs: # # - clone --single-branch selects the default branch; # - clone --depth=1 downloads the same data as actions/checkout; - # - github.event.pull_request.head.sha maps to PR tip, unmerged. + # - clone --filter=blob:none downloads less data than a full clone, + # but the sufficient information for tree navigation. + # - github.event.pull_request.head.sha maps to the not merged PR tip. # # Avoids getting stuck in the past, like GH actions/checkout does, and # we do not need any auth stuff for building the manual. So the results @@ -36,9 +38,9 @@ jobs: run: | # Checkout repositories set -x - git clone -q --single-branch --depth=1 https://github.com/php/doc-base.git doc-base - git clone -q --single-branch --depth=1 https://github.com/php/doc-en.git en - git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br + git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base + git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en + git clone -q --filter=blob:none --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -49,11 +51,11 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" mainsha=$(git rev-parse HEAD) message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" + echo $message set -x - pwd - git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} - git merge -q --message "$message" ${{ github.event.pull_request.head.sha }} + #git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - name: Build manual.xml run: | From 24f0fc6dfacd15697ec7a8da00df23e035d9376b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 8 Aug 2026 12:33:15 -0300 Subject: [PATCH 55/64] Docs and done --- .github/workflows/buildxml.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 6d0217f9b..e27616ab0 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -15,16 +15,14 @@ jobs: runs-on: ubuntu-latest steps: - # Clone default branches and merge PR using only plain git: + # Shallow clone default branches and merge PR using only plain git: # # - clone --single-branch selects the default branch; # - clone --depth=1 downloads the same data as actions/checkout; - # - clone --filter=blob:none downloads less data than a full clone, - # but the sufficient information for tree navigation. # - github.event.pull_request.head.sha maps to the not merged PR tip. # # Avoids getting stuck in the past, like GH actions/checkout does, and - # we do not need any auth stuff for building the manual. So the results + # we do not need any other stuff for building the manual. The results # of workflow re-runs always match with results of normal or squash # merging the pull requests, immediately after a workflow re-run. # @@ -33,14 +31,19 @@ jobs: # busy repositories, the results of CI checks are almost always outdated # and invalid, not representing the future state of the default branch # after the pull request is merged, even after workflows re-runs. + # + # In theory, --filter=blob:none on clone of to be merged repository + # would be faster, and avoid an extra git fetch on PR tip. But cause + # subsequent piecewise downloads of blob data, both on default and + # feature branches, that is slow. - name: Set up files run: | # Checkout repositories set -x - git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base - git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en - git clone -q --filter=blob:none --single-branch https://github.com/php/doc-pt_br.git pt_br + git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base + git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en + git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -54,7 +57,7 @@ jobs: echo $message set -x - #git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - name: Build manual.xml From 02f7da402596358cb9cfcb7b40893a03ce59eab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Mon, 10 Aug 2026 12:55:46 -0300 Subject: [PATCH 56/64] Make stuckness more visible --- .github/workflows/build.yaml | 9 ++++++--- .github/workflows/buildxml.yaml | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6b9e019fb..e01f54cdf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,9 +27,6 @@ jobs: repository: php/doc-en path: en - # GH actions/checkout automatically merges, but tends to get stuck in the past. - # See: https://github.com/php/doc-base/pull/329 - - name: Checkout doc-pt_br (actions/checkout) uses: actions/checkout@v7 with: @@ -40,3 +37,9 @@ jobs: php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 echo sha1sum doc-base/temp/manual.xml + + # GH actions/checkout automatically merges, but tends to get stuck in the past. + + - name: actions/checkout merged where? + run: | + git -C pt_br log --oneline --no-decorate -n10 diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index e27616ab0..ec9e4881f 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -60,6 +60,9 @@ jobs: git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} + echo + git log --oneline --no-decorate -n10 + - name: Build manual.xml run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 From b00891c4dee729dca104cbc888932ea2954c381e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Mon, 10 Aug 2026 13:05:24 -0300 Subject: [PATCH 57/64] Faster? --- .github/workflows/buildxml.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index ec9e4881f..9de8908ea 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -43,7 +43,7 @@ jobs: set -x git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en - git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br + git clone -q --depth=1 --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -55,14 +55,12 @@ jobs: mainsha=$(git rev-parse HEAD) message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" echo $message + echo set -x - git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + #git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - echo - git log --oneline --no-decorate -n10 - - name: Build manual.xml run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 From c7f09b25ab0e6598ed47fb52fe34000b7e8ba69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Mon, 10 Aug 2026 13:08:01 -0300 Subject: [PATCH 58/64] Add fetch --- .github/workflows/buildxml.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 9de8908ea..7beae22b4 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -36,6 +36,9 @@ jobs: # would be faster, and avoid an extra git fetch on PR tip. But cause # subsequent piecewise downloads of blob data, both on default and # feature branches, that is slow. + # + # Does not work: + # - clone --depth=1 --single-branch and merge from SHA without fetch SHA. - name: Set up files run: | @@ -58,7 +61,7 @@ jobs: echo set -x - #git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - name: Build manual.xml From 5ae2b807768041999187c93f727d16018331c6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Mon, 10 Aug 2026 13:10:09 -0300 Subject: [PATCH 59/64] Without depth and without fetch --- .github/workflows/buildxml.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 7beae22b4..00e63f7f7 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -38,7 +38,8 @@ jobs: # feature branches, that is slow. # # Does not work: - # - clone --depth=1 --single-branch and merge from SHA without fetch SHA. + # - clone --depth=1 --single-branch and merge from SHA, + # with or without fetch SHA. - name: Set up files run: | @@ -46,7 +47,7 @@ jobs: set -x git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en - git clone -q --depth=1 --single-branch https://github.com/php/doc-pt_br.git pt_br + git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -61,7 +62,7 @@ jobs: echo set -x - git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + #git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - name: Build manual.xml From 0174f4da779b1b65e123d931656a343f8fcdc998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Mon, 10 Aug 2026 13:12:06 -0300 Subject: [PATCH 60/64] Without depth and with fetch --- .github/workflows/buildxml.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 00e63f7f7..495edef41 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -39,7 +39,8 @@ jobs: # # Does not work: # - clone --depth=1 --single-branch and merge from SHA, - # with or without fetch SHA. + # with or without fetch SHA; + # - clone --single-branch and merge from SHA, without fetch SHA. - name: Set up files run: | @@ -62,7 +63,7 @@ jobs: echo set -x - #git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - name: Build manual.xml From 67537b62947d9dd9af23b667e25c90797ed4e1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Tue, 11 Aug 2026 11:04:45 -0300 Subject: [PATCH 61/64] Inline docs, performance tests --- .github/workflows/buildxml.yaml | 103 ++++++++++++++++++++++++++++---- 1 file changed, 90 insertions(+), 13 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 495edef41..6d2984b88 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -15,32 +15,35 @@ jobs: runs-on: ubuntu-latest steps: - # Shallow clone default branches and merge PR using only plain git: + # Shallow clone default branches and merge PR using only plain git, # - # - clone --single-branch selects the default branch; + # - clone --single-branch filtes the default branch; # - clone --depth=1 downloads the same data as actions/checkout; - # - github.event.pull_request.head.sha maps to the not merged PR tip. + # - github.event.pull_request.head.sha maps to the PR tip, not merged. # # Avoids getting stuck in the past, like GH actions/checkout does, and # we do not need any other stuff for building the manual. The results # of workflow re-runs always match with results of normal or squash # merging the pull requests, immediately after a workflow re-run. # - # To be pedantic clear, Github's pull requests only merge the PRs on the - # "synchronize" event. That does *not* include workflows re-runs. So in - # busy repositories, the results of CI checks are almost always outdated - # and invalid, not representing the future state of the default branch - # after the pull request is merged, even after workflows re-runs. - # - # In theory, --filter=blob:none on clone of to be merged repository - # would be faster, and avoid an extra git fetch on PR tip. But cause - # subsequent piecewise downloads of blob data, both on default and - # feature branches, that is slow. + # To be pedantic clear, Github's pull requests only calculate and + # *caches* the merge points of PRs at the "synchronize" event. + # That does *not* include changes on master/main *or* workflows re-runs. + # So in busy repositories, the results of CI checks are almost always + # outdated and invalid, not representing the future state of the default + # branch after the pull request is merged, even after workflows re-runs. # # Does not work: # - clone --depth=1 --single-branch and merge from SHA, # with or without fetch SHA; # - clone --single-branch and merge from SHA, without fetch SHA. + # + # In theory, replacing --filter=tree:0 or --filter=blob:none on clone + # or PR repository would be faster, and avoid an extra git fetch on PR tip. + # But they cause subsequent piecewise downloads of blob data, both on + # default and feature branches, that appaer to be slower in sub-gigabyte + # repositories than simply cloning with --single-branch and fetching the + # PR branch in one go. - name: Set up files run: | @@ -66,6 +69,80 @@ jobs: git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} + # In theory, replacing --filter=tree:0 or --filter=blob:none on clone + # or PR repository would be faster, and avoid an extra git fetch on PR tip. + # But they cause subsequent piecewise downloads of blob data, both on + # default and feature branches, that appaer to be slower in sub-gigabyte + # repositories than simply cloning with --single-branch and fetching the + # PR branch in one go. + + - name: Alternative --filter=tree:0 + run: | + rm -rf doc-base + rm -rf en + rm -rf pt_br + + - name: Set up files + run: | + # Checkout repositories + set -x + git clone -q --filter=tree:0 https://github.com/php/doc-base.git doc-base + git clone -q --filter=tree:0 https://github.com/php/doc-en.git en + git clone -q --filter=tree:0 https://github.com/php/doc-pt_br.git pt_br + + - name: Merge pull request + run: | + # Plain git merge + cd pt_br + + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + mainsha=$(git rev-parse HEAD) + message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" + echo $message + echo + + set -x + # git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git merge -q --no-edit ${{ github.event.pull_request.head.sha }} + + # In theory, replacing --filter=tree:0 or --filter=blob:none on clone + # or PR repository would be faster, and avoid an extra git fetch on PR tip. + # But they cause subsequent piecewise downloads of blob data, both on + # default and feature branches, that appaer to be slower in sub-gigabyte + # repositories than simply cloning with --single-branch and fetching the + # PR branch in one go. + + - name: Alternative --filter=blob:none + run: | + rm -rf doc-base + rm -rf en + rm -rf pt_br + + - name: Set up files + run: | + # Checkout repositories + set -x + git clone -q --filter=blob:none https://github.com/php/doc-base.git doc-base + git clone -q --filter=blob:none https://github.com/php/doc-en.git en + git clone -q --filter=blob:none https://github.com/php/doc-pt_br.git pt_br + + - name: Merge pull request + run: | + # Plain git merge + cd pt_br + + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + mainsha=$(git rev-parse HEAD) + message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" + echo $message + echo + + set -x + # git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} + git merge -q --no-edit ${{ github.event.pull_request.head.sha }} + - name: Build manual.xml run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 From 2176571785fb7fe8b8cec7807a815272a67ae7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Tue, 11 Aug 2026 11:09:59 -0300 Subject: [PATCH 62/64] More performance tests --- .github/workflows/buildxml.yaml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 6d2984b88..452c397da 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -86,9 +86,9 @@ jobs: run: | # Checkout repositories set -x - git clone -q --filter=tree:0 https://github.com/php/doc-base.git doc-base - git clone -q --filter=tree:0 https://github.com/php/doc-en.git en - git clone -q --filter=tree:0 https://github.com/php/doc-pt_br.git pt_br + git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base + git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en + git clone -q --filter=tree:0 https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -103,7 +103,6 @@ jobs: echo set -x - # git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} # In theory, replacing --filter=tree:0 or --filter=blob:none on clone @@ -123,9 +122,9 @@ jobs: run: | # Checkout repositories set -x - git clone -q --filter=blob:none https://github.com/php/doc-base.git doc-base - git clone -q --filter=blob:none https://github.com/php/doc-en.git en - git clone -q --filter=blob:none https://github.com/php/doc-pt_br.git pt_br + git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base + git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en + git clone -q --filter=blob:none https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -140,7 +139,6 @@ jobs: echo set -x - # git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - name: Build manual.xml From a02e84c1316f85ce5349ddfc148174813cb5b533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Tue, 11 Aug 2026 11:16:14 -0300 Subject: [PATCH 63/64] Docs, performance. --- .github/workflows/buildxml.yaml | 82 ++------------------------------- 1 file changed, 5 insertions(+), 77 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index 452c397da..b354cac93 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -15,9 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - # Shallow clone default branches and merge PR using only plain git, + # Shallow clone default branches and merge PR using only plain git # - # - clone --single-branch filtes the default branch; + # - clone --single-branch filter the default branch; # - clone --depth=1 downloads the same data as actions/checkout; # - github.event.pull_request.head.sha maps to the PR tip, not merged. # @@ -38,10 +38,10 @@ jobs: # with or without fetch SHA; # - clone --single-branch and merge from SHA, without fetch SHA. # - # In theory, replacing --filter=tree:0 or --filter=blob:none on clone - # or PR repository would be faster, and avoid an extra git fetch on PR tip. + # In theory, filtering by --filter=tree:0 or --filter=blob:none on clone + # of PR repository would be faster, and avoid an extra git fetch on PR tip. # But they cause subsequent piecewise downloads of blob data, both on - # default and feature branches, that appaer to be slower in sub-gigabyte + # default and feature branches, that appear to be slower in sub-gigabyte # repositories than simply cloning with --single-branch and fetching the # PR branch in one go. @@ -69,78 +69,6 @@ jobs: git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - # In theory, replacing --filter=tree:0 or --filter=blob:none on clone - # or PR repository would be faster, and avoid an extra git fetch on PR tip. - # But they cause subsequent piecewise downloads of blob data, both on - # default and feature branches, that appaer to be slower in sub-gigabyte - # repositories than simply cloning with --single-branch and fetching the - # PR branch in one go. - - - name: Alternative --filter=tree:0 - run: | - rm -rf doc-base - rm -rf en - rm -rf pt_br - - - name: Set up files - run: | - # Checkout repositories - set -x - git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base - git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en - git clone -q --filter=tree:0 https://github.com/php/doc-pt_br.git pt_br - - - name: Merge pull request - run: | - # Plain git merge - cd pt_br - - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - mainsha=$(git rev-parse HEAD) - message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" - echo $message - echo - - set -x - git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - - # In theory, replacing --filter=tree:0 or --filter=blob:none on clone - # or PR repository would be faster, and avoid an extra git fetch on PR tip. - # But they cause subsequent piecewise downloads of blob data, both on - # default and feature branches, that appaer to be slower in sub-gigabyte - # repositories than simply cloning with --single-branch and fetching the - # PR branch in one go. - - - name: Alternative --filter=blob:none - run: | - rm -rf doc-base - rm -rf en - rm -rf pt_br - - - name: Set up files - run: | - # Checkout repositories - set -x - git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base - git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en - git clone -q --filter=blob:none https://github.com/php/doc-pt_br.git pt_br - - - name: Merge pull request - run: | - # Plain git merge - cd pt_br - - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - mainsha=$(git rev-parse HEAD) - message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" - echo $message - echo - - set -x - git merge -q --no-edit ${{ github.event.pull_request.head.sha }} - - name: Build manual.xml run: | php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=pt_br 2>&1 From 7780dba7a041af478bc9be4a206bec7ecbcdf6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Tue, 11 Aug 2026 20:12:52 -0300 Subject: [PATCH 64/64] More idiomatic en --- .github/workflows/buildxml.yaml | 37 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/buildxml.yaml b/.github/workflows/buildxml.yaml index b354cac93..c0ea8019e 100644 --- a/.github/workflows/buildxml.yaml +++ b/.github/workflows/buildxml.yaml @@ -15,43 +15,43 @@ jobs: runs-on: ubuntu-latest steps: - # Shallow clone default branches and merge PR using only plain git + # Shallow clone default branch and merge the PR using only plain git # - # - clone --single-branch filter the default branch; # - clone --depth=1 downloads the same data as actions/checkout; + # - clone --single-branch filter only the default branch; # - github.event.pull_request.head.sha maps to the PR tip, not merged. # # Avoids getting stuck in the past, like GH actions/checkout does, and # we do not need any other stuff for building the manual. The results - # of workflow re-runs always match with results of normal or squash - # merging the pull requests, immediately after a workflow re-run. + # of workflow re-runs always match with results of normal or squashed + # merges of pull requests, immediately after a workflow re-run. # - # To be pedantic clear, Github's pull requests only calculate and - # *caches* the merge points of PRs at the "synchronize" event. + # To be pedantic clear, Github's pull requests calculate and *caches* + # the merge points of PRs, *only* at the PR's "synchronize" event. # That does *not* include changes on master/main *or* workflows re-runs. - # So in busy repositories, the results of CI checks are almost always + # So, in busy repositories, the results of CI checks are almost always # outdated and invalid, not representing the future state of the default - # branch after the pull request is merged, even after workflows re-runs. + # branch after the pull request is merged. Re-running workflows also + # changes nothing. # # Does not work: - # - clone --depth=1 --single-branch and merge from SHA, - # with or without fetch SHA; - # - clone --single-branch and merge from SHA, without fetch SHA. + # - clone --depth=1 and merge from PR SHA, with or without fetch by SHA; + # - clone --single-branch and merge from PR SHA, without fetch by SHA. # - # In theory, filtering by --filter=tree:0 or --filter=blob:none on clone - # of PR repository would be faster, and avoid an extra git fetch on PR tip. + # In theory, using --filter=tree:0 or --filter=blob:none on clone of the + # PR branch would be faster, and avoid an extra git fetch on PR tip. # But they cause subsequent piecewise downloads of blob data, both on # default and feature branches, that appear to be slower in sub-gigabyte # repositories than simply cloning with --single-branch and fetching the - # PR branch in one go. + # PR tip in one go. - name: Set up files run: | # Checkout repositories set -x - git clone -q --depth=1 --single-branch https://github.com/php/doc-base.git doc-base - git clone -q --depth=1 --single-branch https://github.com/php/doc-en.git en - git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br + git clone -q --depth=1 https://github.com/php/doc-base.git doc-base + git clone -q --depth=1 https://github.com/php/doc-en.git en + git clone -q --single-branch https://github.com/php/doc-pt_br.git pt_br - name: Merge pull request run: | @@ -62,9 +62,8 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" mainsha=$(git rev-parse HEAD) message="Merge ${{ github.event.pull_request.head.sha }} into ${mainsha}" - echo $message - echo + echo $message set -x git fetch -q --no-tags --prune --no-recurse-submodules origin ${{ github.event.pull_request.head.sha }} git merge -q --no-edit ${{ github.event.pull_request.head.sha }}