From 26e38f8b766b5f8a41caaa2f136ab57f5ff7295b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20K=C3=A4hm?= Date: Mon, 7 Oct 2024 16:09:13 +0200 Subject: [PATCH] [FIX] allow tags/releases from main branch Set fixed env.BRANCH_NAME to main. Relates: #3995 --- .github/workflows/ci.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e928e927d..83bd58c53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ env: TESTING_SOLR_PORT: 8983 LOCAL_VOLUME_NAME: 'solrci-volume' LOCAL_VOLUME_PATH: '/home/runner/work/ext-solr/ext-solr/.Build/data-solr' + BRANCH_NAME: 'main' jobs: ci_bootstrapping: @@ -46,28 +47,6 @@ jobs: if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} uses: actions/checkout@v4 # End: Workaround for issue with actions/checkout... - - - name: "Resolve target branch of pull request." - if: github.event_name == 'pull_request' - run: | - echo "BRANCH_NAME=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - - - name: "Resolve branch name on push in branch of repository." - if: ${{ !startsWith(github.ref, 'refs/tags/') && (github.event_name == 'push' || github.event_name == 'schedule') }} - run: | - echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - - - # We want to pass tests before the tag/release can be pushed to TER. - # This step resolves the branch name of the tag to use, to be able to collect proper build matrix values. - name: "Resolve branch name on release/tag in branch of repository." - if: startsWith(github.ref, 'refs/tags/') - # //[!0-9]/ in script below removes possible "v" prefix from major part, - # to prevent errors or make it possible to create tags with "v" or other prefixes. - run: | - export RELEASE_VERSION=${GITHUB_REF/refs\/tags\//} - export MAJOR_MINOR_VERSIONS_STRING=$(v=( ${RELEASE_VERSION//./ } ) && echo "${v[0]//[!0-9]/}.${v[1]}") - export BRANCH_NAME=release-"$MAJOR_MINOR_VERSIONS_STRING".x - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - name: Collect build matrix id: collect_build_matrix @@ -110,7 +89,7 @@ jobs: needs: ci_bootstrapping continue-on-error: ${{ contains(matrix.TYPO3, '-dev') }} strategy: - matrix: ${{fromJson(needs.ci_bootstrapping.outputs.matrix)}} + matrix: ${{ fromJson(needs.ci_bootstrapping.outputs.matrix) }} env: TYPO3_DATABASE_NAME: 'typo3_ci' TYPO3_DATABASE_HOST: '127.0.0.1'