From 17d066a98046d561e1e0248439a68919a59416c9 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 18 Sep 2024 20:41:03 +0200 Subject: [PATCH 1/3] [ticket/17396] Only try pushing if merge was successful PHPBB-17396 --- .github/workflows/merge_3.3.x_to_master.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge_3.3.x_to_master.yml b/.github/workflows/merge_3.3.x_to_master.yml index aa05026235..2863fa8c1e 100644 --- a/.github/workflows/merge_3.3.x_to_master.yml +++ b/.github/workflows/merge_3.3.x_to_master.yml @@ -35,11 +35,18 @@ jobs: run: git fetch --all - name: Merge 3.3.x into master + # First checkout 3.3.x and master to track from origin, then try merging to master run: | + git checkout 3.3.x git checkout master - git merge --no-ff 3.3.x + if git merge --no-ff 3.3.x; then + echo "merge_failed=false" >> $GITHUB_ENV + else + echo "merge_failed=true" >> $GITHUB_ENV + fi - - name: Push changes to master + - name: Push changes to master if merge was successful + if: env.merge_failed == 'false' run: git push origin master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d6a17c1fe7f9dd9f4522fb9a922604076348267a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 19 Sep 2024 20:48:21 +0200 Subject: [PATCH 2/3] [ticket/17396] Fetch full history and branch 3.3.x if merging to master PHPBB-17396 --- .github/workflows/merge_3.3.x_to_master.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge_3.3.x_to_master.yml b/.github/workflows/merge_3.3.x_to_master.yml index 2863fa8c1e..4aec43cded 100644 --- a/.github/workflows/merge_3.3.x_to_master.yml +++ b/.github/workflows/merge_3.3.x_to_master.yml @@ -12,6 +12,9 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch full history for proper merging + ref: 3.3.x # Checkout the 3.3.x branch - name: Fetch the latest commit information id: get-commit-info @@ -35,9 +38,7 @@ jobs: run: git fetch --all - name: Merge 3.3.x into master - # First checkout 3.3.x and master to track from origin, then try merging to master run: | - git checkout 3.3.x git checkout master if git merge --no-ff 3.3.x; then echo "merge_failed=false" >> $GITHUB_ENV From 08d184b0fa0ebc97c28e5107d348abb1ccb03365 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 25 Sep 2024 14:21:38 +0100 Subject: [PATCH 3/3] [ticket/17396] Try running other-tests on ubuntu-20.04 PHPBB-17396 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 893c4c4a28..32d8477671 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -351,7 +351,7 @@ jobs: # Other database types, namely sqlite3 and mssql other-tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 strategy: matrix: include: