diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 574746e..a0abfd3 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -9,30 +9,40 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Authorize in Docker - run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} +# - name: Authorize in Docker +# run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} +# +# - name: Set up JDK 20 +# uses: actions/setup-java@v2 +# with: +# java-version: '20' +# distribution: 'adopt' +# +# - name: Build JAR +# run: ./gradlew bootJar +# +# - name: Build Docker image +# run: docker build --platform linux/amd64 -t almaxgood/cardio-bot:1.0.0 . +# +# - name: Push Docker image +# run: docker push almaxgood/cardio-bot:1.0.0 +# +# - name: Install sshpass +# run: sudo apt install sshpass - - name: Set up JDK 20 - uses: actions/setup-java@v2 - with: - java-version: '20' - distribution: 'adopt' + - name: Compose .env file + run: | + echo POSTGRES_USER=>>.env + echo POSTGRES_PASSWORD=>>.env + echo MAIN_TOKEN=>>.env + echo LOGGER_TOKEN=>>.env + echo GUIDE=>>.env + echo DOCKER_TAG=>>.env + cat .env - - name: Build JAR - run: ./gradlew bootJar - - - name: Build Docker image - run: docker build --platform linux/amd64 -t almaxgood/cardio-bot:1.0.0 . - - - name: Push Docker image - run: docker push almaxgood/cardio-bot:1.0.0 - - - name: Install sshpass - run: sudo apt install sshpass - - - name: Run on VM - run: sshpass -p ${{ secrets.VM_PASSWORD }} ssh -o StrictHostKeyChecking=no root@${{ secrets.VM_IP }} - 'cd ~/cardio-bot && - docker compose down && - docker system prune -a -f --volumes && - docker compose up -d' \ No newline at end of file +# - name: Run on VM +# run: sshpass -p ${{ secrets.VM_PASSWORD }} ssh -o StrictHostKeyChecking=no root@${{ secrets.VM_IP }} +# 'cd ~/cardio-bot && +# docker compose down && +# docker system prune -a -f --volumes && +# docker compose up -d' \ No newline at end of file