Skip to content

Update main.yml

Update main.yml #39

Workflow file for this run

# main.yaml

Check failure on line 1 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: push_to_registry
name: Build, Test, and Update Data
on:
push:
branches: ['main']
jobs:
test_and_update_data:
name: Run Jest Tests and Update Data
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Run Jest Tests
run: |
docker-compose -f docker-compose.dependencies.yaml -f docker-compose.app.yaml run --rm app npm test
- name: Generate Data Dump
run: |
docker-compose -f docker-compose.dependencies.yaml -f docker-compose.app.yaml run --rm app generate_data_dump.sh
- name: Import Data into Clever Cloud Database
run: |
mysql -h$CLEVER_CLOUD_DB_HOST -u$CLEVER_CLOUD_DB_USER -p$CLEVER_CLOUD_DB_PASSWORD $CLEVER_CLOUD_DB_NAME < data_dump.sql
env:
CLEVER_CLOUD_DB_HOST: ${{ secrets.CLEVER_CLOUD_DB_HOST }}
CLEVER_CLOUD_DB_USER: ${{ secrets.CLEVER_CLOUD_DB_USER }}
CLEVER_CLOUD_DB_PASSWORD: ${{ secrets.CLEVER_CLOUD_DB_PASSWORD }}
CLEVER_CLOUD_DB_NAME: ${{ secrets.CLEVER_CLOUD_DB_NAME }}
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
needs: test_and_update_data
steps:
# ... (existing steps remain unchanged)