Skip to content

Fixed meta fetch

Fixed meta fetch #32

Workflow file for this run

name: GitHub to Codeberg
on:
push:
delete:
workflow_dispatch: # Allows manual triggering
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.email "no@thankyou.com"
git config --global user.name "Apple Cat"
- name: Add Codeberg remote
run: git remote add codeberg "https://aec:${{ secrets.CODEBERG_TOKEN }}@codeberg.org/ampmod/scratch-gui.git"
- name: Fetch from Codeberg
run: git fetch codeberg --prune
- name: Mirror to Codeberg
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
git push --mirror codeberg || echo "error"
elif [[ "${{ github.event_name }}" == "delete" ]]; then
git push codeberg --delete ${{ github.ref_name }} || echo "error"
fi
- name: Remove Codeberg remote
run: git remote remove codeberg