Skip to content

Commit

Permalink
ci: workflows: test-and-deploy: Add tag validation with VERSION file
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Jun 3, 2024
1 parent 4270087 commit 87732ab
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 87732ab

Please sign in to comment.