Skip to content

Syntax fix in ci file #12

Syntax fix in ci file

Syntax fix in ci file #12

Workflow file for this run

name: CI
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# Get code
- name: Checkout repository
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip

Check failure on line 31 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 31
pip install -r backend/requirements.txt
# Run tests
# - name: Run tests
# run: |
# pytest backend/tests/
# Log in to Github Container Registry
- name: Log in to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build and push Docker image (for main only)
- name: Build and push Docker image
if: github.ref == 'refs/heads/main'
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/eventrelay
IMAGE_TAG=${{ github.sha }}
docker build \
-f backend/Dockerfile \
-t $IMAGE_NAME:latest \
-t $IMAGE_NAME:$IMAGE_TAG \
backend
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:$IMAGE_TAG