Skip to content

Trigger Import

Trigger Import #474

Workflow file for this run

name: Trigger Import
on:
schedule:
- cron: '0 15 * * *'
workflow_dispatch:
jobs:
trigger-import:
name: Import
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: composer:v2
extensions: pdo pdo_mysql sockets zip gd soap
env:
update: true
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(cd server && composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: cd server && APP_ENV=prod composer install --no-dev
- name: Check the Symfony console
env:
MASTR_API_KEY: ${{ secrets.MASTR_API_KEY }}
MASTR_API_USER: ${{ secrets.MASTR_API_USER }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
CITY: herne
run: |
APP_ENV=prod MASTR_API_KEY=$MASTR_API_KEY MASTR_API_USER=$MASTR_API_USER DATABASE_URL=$DATABASE_URL server/bin/console app:import $CITY