Skip to content

Update mirror.yml

Update mirror.yml #50

Workflow file for this run

name: Mirror Branch to ISYE
on:
push:
branches:
- production
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Pull CEC repo
run: |
git clone ${{ github.server_url }}/${{ github.repository }}
- name: Update CEC repository
run: |
cd ${{ github.event.repository.name }}
git switch production
git fetch --force origin
git pull
- name: Add the ISYE repository as a mirror
run: |

Check failure on line 25 in .github/workflows/mirror.yml

View workflow run for this annotation

GitHub Actions / Mirror Branch to ISYE

Invalid workflow file

The workflow is not valid. .github/workflows/mirror.yml (Line: 25, Col: 14): Unrecognized named-value: 'variables'. Located at position 1 within expression: variables.ISYE_MIRROR_REPO
cd ${{ github.event.repository.name }}
git remote add mirror https://${{ secrets.ISYE_MIRROR_USER }}:${{ secrets.ISYE_MIRROR_TOKEN }}@${{ variables.ISYE_MIRROR_REPO }}
git fetch --force mirror
- name: Remove the .github folder to avoid a recursive workflow
run: |
cd ${{ github.event.repository.name }}
rm -rf .github
- name: Commit the change
run: |
cd ${{ github.event.repository.name }}
git config --global user.email ""
git config --global user.name "GitHub Actions"
git commit -a -m "[GitHub Action] Synced with CEC parent repo"
- name: Push to the ISYE main branch
run: |
cd ${{ github.event.repository.name }}
git push mirror production --force