Fix pipeline

This commit is contained in:
Alex Root Junior 2020-11-30 01:36:40 +02:00
parent b6470ccac4
commit 4a3117ec1f

View File

@ -34,8 +34,10 @@ jobs:
with: with:
format: YYYYMMDD format: YYYYMMDD
- name: Set version - name: Set version
id: current-version
run: | run: |
TG_SERVER_VERSION=$(cat telegram-bot-api/CMakeLists.txt | grep TelegramBotApi | cut -d " " -f3) TG_SERVER_VERSION=$(cat telegram-bot-api/CMakeLists.txt | grep TelegramBotApi | cut -d " " -f3)
echo "TG_SERVER_VERSION=${TG_SERVER_VERSION}" >> $GITHUB_ENV
echo "Parsed version: ${TG_SERVER_VERSION}" echo "Parsed version: ${TG_SERVER_VERSION}"
- name: Build and push - name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
@ -47,4 +49,4 @@ jobs:
tags: | tags: |
aiogram/telegram-bot-api:latest aiogram/telegram-bot-api:latest
aiogram/telegram-bot-api:${{ steps.current-time.outputs.formattedTime }} aiogram/telegram-bot-api:${{ steps.current-time.outputs.formattedTime }}
aiogram/telegram-bot-api:${{ env.TG_SERVER_VERSION }} aiogram/telegram-bot-api:${{ steps.current-version.env.TG_SERVER_VERSION }}