From ae17fb2921b724a3155e1d211953b62e075e1b63 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 | 8 +------- .github/workflows/lint.yml | 8 +------- .github/workflows/tests.yml | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) 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..baa2682f3 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..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