Skip to content

refactor(CI): add some handling #5

refactor(CI): add some handling

refactor(CI): add some handling #5

Workflow file for this run

name: Mirror Workflow 🪞
env:
# SOURCE_URL: "https://github.com/EdukaiFR/website.git"
MIRROR_URL: "khalidbelk/testCI.git"
on: push
branches:

Check failure on line 8 in .github/workflows/mirrorV2.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/mirrorV2.yml

Invalid workflow file

You have an error in your yaml syntax on line 8
- main
- feat/CI
jobs:
push_to_mirror:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[Mirror CI]')"
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- name: Push to mirror
env:
PAT: ${{ secrets.PAT_TOKEN }}
run: |
set -e
git config user.name "Github Action"
git config user.email "action@github.com"
git remote add mirror https://${PAT}@github.com/${{ env.MIRROR_URL }}
git push mirror main:main --force -m "[Mirror CI] - Update repository"