From 5b68f8793d614a6912f8f033c6605eeac7c9393d Mon Sep 17 00:00:00 2001 From: cedb Date: Wed, 2 Nov 2022 17:57:02 -0400 Subject: [PATCH] Add version build --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e105e15..3e012710 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,9 +78,14 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get current version from gradle + run: APP_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}') + - name: Build and push uses: docker/build-push-action@v3 with: context: . push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/signal-cli:latest \ No newline at end of file + tags: + - ${{ secrets.DOCKERHUB_USERNAME }}/signal-cli:latest + - ${{ secrets.DOCKERHUB_USERNAME }}/signal-cli:${{ env.APP_VERSION }} \ No newline at end of file