name: Mirroring

on:
  workflow_dispatch:
  pull_request:
    branches: [ master ]

jobs:
  lint-and-mirror:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: PHP Lint
      uses: michaelw90/PHP-Lint@2.1.0

    - name: Mirror to VOC gitolite
      uses: pixta-dev/repository-mirroring-action@v1
      with:
        target_repo_url:
          git@git.c3voc.de:streaming-website.git
        ssh_private_key:
          ${{ secrets.SSH_PRIVATE_KEY }}