Skip to content

Workflow file for this run

name: CURAZ CI/CD Pipeline
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "::add-path::${HOME}/.local/bin"
- name: Install dependencies
run: poetry install
- name: Export requirements.txt
run: poetry export -f requirements.txt --output requirements.txt
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build Docker image
run: docker build -t curaz/api-server:latest .
- name: Push Docker image
run: docker push curaz/api-server:latest
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to server
uses: appleboy/ssh-action@v0.1.3

Check failure on line 64 in .github/workflows/curaz-cicd.yml

View workflow run for this annotation

GitHub Actions / CURAZ CI/CD Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/curaz-cicd.yml (Line: 64, Col: 12): Unexpected symbol: 'SERVER_HOST:0:1'. Located at position 9 within expression: secrets.SERVER_HOST:0:1
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_PASSWORD }}
password: ${{ secrets.SERVER_REMOTE_USER }}
script: |
cd /path/to/your/docker-compose-directory
docker-compose pull
docker-compose up -d