From 4270087870b031421748870a80aff955ddb1199b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 3 Jun 2024 18:08:47 -0300 Subject: [PATCH 1/2] core: Add version file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- core/VERSION | 1 + 1 file changed, 1 insertion(+) create mode 100644 core/VERSION diff --git a/core/VERSION b/core/VERSION new file mode 100644 index 0000000000..a58941b07a --- /dev/null +++ b/core/VERSION @@ -0,0 +1 @@ +1.3 \ No newline at end of file From 87732abf4bd21bfc383a4a91bbaf0826560ec5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 3 Jun 2024 18:17:39 -0300 Subject: [PATCH 2/2] ci: workflows: test-and-deploy: Add tag validation with VERSION file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .github/workflows/test-and-deploy.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 872984cb65..b41b6abcf3 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -12,6 +12,20 @@ on: - cron: '0 0 */6 * *' jobs: + check-version: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-tags: true + - name: Check tag with VERSION file + run: | + VERSION_TAG="$(git describe --tags --abbrev=0)" + echo "Version tag: $VERSION_TAG" + echo "Checking if VERSION file is updated.." + (( $(echo "$(echo "$VERSION" | cut -d. -f1-2) > $(cat ./core/VERSION)" |bc -l) )) + python-tests: runs-on: ubuntu-latest @@ -78,7 +92,7 @@ jobs: deploy-docker-images: runs-on: ubuntu-latest - needs: [python-tests, frontend-tests] + needs: [python-tests, frontend-tests, "check-version"] strategy: matrix: docker: [bootstrap, core]