diff --git a/.github/workflows/prerelease-test.yaml b/.github/workflows/prerelease-test.yaml new file mode 100644 index 00000000000..7f9f809a9f5 --- /dev/null +++ b/.github/workflows/prerelease-test.yaml @@ -0,0 +1,47 @@ +# Push the release branch to upstream/prerelease_test branch in the TimescaleDB repository. +# +# Commits on this branch will be tested by more tests than our usual PRs. +# You can see the pre-release test progress under the actions +# (https://github.com/timescale/timescaledb/actions?query=branch%3Aprerelease_test) +# or under the pull request you created for the release. +# +# Note: Because the upgrade script does not get executed at this stage, some test might fail. +# These test failures can be ignored at this point. Your branch will be re-tested as soon as +# the proper downgrade script is created and the versioning is adjusted. + +name: Prerelease Tests on Release branch +on: + workflow_dispatch: + schedule: + # run daily at 5 am UTC + - cron: '0 5 * * *' + +# The workflow needs the permission to push branches +permissions: + contents: write + +jobs: + prerelease_test: + name: Prerelease test + runs-on: ubuntu-latest + + steps: + + - name: Checkout TimescaleDB + uses: actions/checkout@v4 + + - name: Set RELEASE_BRANCH as per environment + run: | + OLD_MINOR_VERSION=$(tail -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1) + echo "RELEASE_BRANCH="$(echo ${OLD_MINOR_VERSION%?}x)" >> $GITHUB_ENV + + - name: Checkout TimescaleDB release branch + uses: actions/checkout@v4 + with: + ref: ${{ env.RELEASE_BRANCH }} + + - name: Push the release branch to prerelease_test branch + env: + GITHUB_TOKEN: ${{ secrets.ORG_AUTOMATION_TOKEN }} + run: | + git push upstream HEAD:prerelease_test --force