Files
SirBlob 3713921e8f
Some checks failed
Build and Release / Build Linux (push) Has been skipped
Sync to GitHub / sync (push) Failing after 37s
Build and Release / Build Windows (push) Has been cancelled
Build and Release / Build macOS (push) Has been cancelled
Build and Release / Create Release (push) Has been cancelled
Build and Release / Development Build (push) Has been cancelled
Sync workflow Update 2
2025-11-07 19:24:58 -05:00

42 lines
1014 B
YAML

name: Sync to GitHub
on:
push:
branches:
- '**'
delete:
branches:
- '**'
create:
tags:
- '**'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_REPO: ${{ secrets.GH_REPO }}
run: |
git config --global user.name "Gitea Actions"
git config --global user.email "actions@gitea.local"
git remote remove github 2>/dev/null || true
git remote add github https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO}.git
git push github --all --force
git push github --tags --force
- name: Sync status
if: success()
run: echo "Successfully synced to GitHub"
- name: Sync failed
if: failure()
run: echo "Failed to sync to GitHub"