Files
Gitea-Desktop/.gitea/workflows/sync.yml
SirBlob c72ef28b78
Some checks failed
Build and Release / Build Linux (push) Has been skipped
Sync to GitHub / sync (push) Failing after 41s
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
2025-11-07 19:22:44 -05:00

40 lines
953 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 remote add github https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPO}.git || true
git remote set-url 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"