|
|
name: Sync to Target Repos |
|
|
on: |
|
|
push: |
|
|
branches: [main] |
|
|
|
|
|
|
|
|
workflow_dispatch: |
|
|
|
|
|
jobs: |
|
|
sync-to-targets: |
|
|
runs-on: ubuntu-latest |
|
|
steps: |
|
|
- uses: actions/checkout@v4 |
|
|
with: |
|
|
fetch-depth: 0 |
|
|
lfs: true |
|
|
- name: Push to HF spaces |
|
|
env: |
|
|
HF: ${{ secrets.HF }} |
|
|
run: git push --force https://soumyaprabhamaiti:[email protected]/spaces/soumyaprabhamaiti/pet-image-segmentation-pytorch main |
|
|
- name: Push to core lib github repo |
|
|
env: |
|
|
CORE_LIB_GH_PAT: ${{ secrets.CORE_LIB_GH_PAT }} |
|
|
CORE_LIB_REPO_NAME: pet_seg_core |
|
|
run: rm -rf .git && cd $CORE_LIB_REPO_NAME && git config --global user.email "[email protected]" && git config --global user.name "Github Actions (on behalf of Soumya Prabha Maiti)" && git init --initial-branch=main && git add . && git commit -m "Modify core library" && git remote add origin https://[email protected]/soumya-prabha-maiti/$CORE_LIB_REPO_NAME.git && git push -u origin main --force |