diff --git a/.github/workflows/container-smoke-test.yml b/.github/workflows/container-smoke-test.yml index 89d6d4a2d..a92bd387f 100644 --- a/.github/workflows/container-smoke-test.yml +++ b/.github/workflows/container-smoke-test.yml @@ -20,14 +20,8 @@ jobs: with: fetch-depth: 0 - - name: Install requirements - run: make install-dev - - name: Resolve Karapace version - run: | - source ./venv/bin/activate - KARAPACE_VERSION=$(python -c "from karapace import version; print(version.__version__)") - echo KARAPACE_VERSION=$KARAPACE_VERSION >> $GITHUB_ENV + run: echo KARAPACE_VERSION="$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g')" >> $GITHUB_ENV - run: echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV - run: echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1de08c44f..0f3eec51a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -42,14 +42,15 @@ jobs: cache: pip python-version: '3.12' - - name: Install requirements - run: make install-dev + - name: Gather context + id: ctx + run: | + echo is_release=${{ contains(github.ref, 'refs/tags/') }} | tee -a $GITHUB_OUTPUT + echo is_dev=${{ ! contains(github.ref, 'refs/tags/') }} | tee -a $GITHUB_OUTPUT + echo version=$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g') - name: Resolve Karapace version - run: | - source ./venv/bin/activate - KARAPACE_VERSION=$(python -c "from karapace import version; print(version.__version__)") - echo KARAPACE_VERSION=$KARAPACE_VERSION >> $GITHUB_ENV + run: echo KARAPACE_VERSION="$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g')" >> $GITHUB_ENV - run: echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV - run: echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV @@ -57,6 +58,7 @@ jobs: - name: Run mypy run: make type-check-mypy-in-docker env: + KV: ${{ steps.ctx.outputs.version }} PYTHON_VERSION: 3.12 KARAPACE_VERSION: ${{ env.KARAPACE_VERSION }} RUNNER_UID: ${{ env.RUNNER_UID }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df5b5683b..2c1e0813c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,14 +40,8 @@ jobs: with: go-version: '1.21.0' - - name: Install requirements - run: make install-dev - - name: Resolve Karapace version - run: | - source ./venv/bin/activate - KARAPACE_VERSION=$(python -c "from karapace import version; print(version.__version__)") - echo KARAPACE_VERSION=$KARAPACE_VERSION >> $GITHUB_ENV + run: echo KARAPACE_VERSION="$(git describe --tags | cut -d '-' -f -2 | sed 's/-/.dev/g')" >> $GITHUB_ENV - run: echo "RUNNER_UID=$(id -u)" >> $GITHUB_ENV - run: echo "RUNNER_GID=$(id -g)" >> $GITHUB_ENV