Skip to content

Commit

Permalink
Set only the env var we need
Browse files Browse the repository at this point in the history
later in the script
  • Loading branch information
pallavisontakke committed Feb 7, 2025
1 parent d814d44 commit ff94b4e
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions .github/workflows/run_nightly_tests_on_release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,13 @@ jobs:
- name: Checkout TimescaleDB
uses: actions/checkout@v4

- name: Set env var CURRENT_MAIN_VERSION
run: echo "CURRENT_MAIN_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)" >> $GITHUB_ENV
- name: Test env var CURRENT_MAIN_VERSION
run: echo $CURRENT_MAIN_VERSION

- name: Set env var CURRENT_MINOR_VERSION
run: echo "CURRENT_MINOR_VERSION=$(echo ${{ env.CURRENT_MAIN_VERSION }} | cut -d '.' -f 2)" >> $GITHUB_ENV
- name: Test env var CURRENT_MINOR_VERSION
run: echo $CURRENT_MINOR_VERSION

- name: Set env var OLD_MINOR_VERSION
run: echo "OLD_MINOR_VERSION=$((${{ env.CURRENT_MINOR_VERSION }} - 1))" >> $GITHUB_ENV
- name: Test env var OLD_MINOR_VERSION
run: echo $OLD_MINOR_VERSION

- name: Set env var OLD_MINOR_VERSION_FULL
run: echo "OLD_MINOR_VERSION_FULL=$(echo ${{ env.CURRENT_MAIN_VERSION }} | sed -e "s/${{ env.CURRENT_MINOR_VERSION }}/${{ env.OLD_MINOR_VERSION }}/g")" >> $GITHUB_ENV
- name: Test env var OLD_MINOR_VERSION_FULL
run: echo $OLD_MINOR_VERSION_FULL

- name: Set env var OLD_MINOR_VERSION_BRANCH
run: echo "OLD_MINOR_VERSION_BRANCH="${${{ env.OLD_MINOR_VERSION_FULL }}/%.0/.x}"" >> $GITHUB_ENV
- name: Test env var OLD_MINOR_VERSION_BRANCH
run: echo $OLD_MINOR_VERSION_BRANCH
shell: bash

Check failure on line 19 in .github/workflows/run_nightly_tests_on_release_branch.yml

View workflow job for this annotation

GitHub Actions / Check YAML code in tree

19:7 syntax error: expected <block end>, but found '?' (syntax)
run: |
CURRENT_MAIN_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
CURRENT_MINOR_VERSION=$(echo $CURRENT_MAIN_VERSION | cut -d '.' -f 2)
OLD_MINOR_VERSION=$(echo $CURRENT_MAIN_VERSION | sed -e "s/$CURRENT_MINOR_VERSION/$(($CURRENT_MINOR_VERSION - 1))/g")
echo "OLD_MINOR_VERSION_BRANCH="${OLD_MINOR_VERSION/%.0/.x}"" >> $GITHUB_ENV
- name: Run nightly tests
if: github.event.schedule != '0 22 * * SAT'
Expand Down

0 comments on commit ff94b4e

Please sign in to comment.