From b2fe64a48e7a7a2a280359c4130477c37932dd63 Mon Sep 17 00:00:00 2001 From: Emmanuel Evbuomwan Date: Wed, 18 Dec 2024 15:10:33 +0100 Subject: [PATCH] ci: extract version from git tags --- .github/workflows/container-smoke-test.yml | 7 +------ .github/workflows/lint.yml | 8 +------- .github/workflows/tests.yml | 7 +------ 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/container-smoke-test.yml b/.github/workflows/container-smoke-test.yml index 89d6d4a2d..4981eed1a 100644 --- a/.github/workflows/container-smoke-test.yml +++ b/.github/workflows/container-smoke-test.yml @@ -20,14 +20,9 @@ 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 + 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..9af1f31d1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -42,14 +42,8 @@ jobs: cache: pip python-version: '3.12' - - 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/tests.yml b/.github/workflows/tests.yml index df5b5683b..6ecf8c641 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,14 +40,9 @@ 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 + 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