mirror of
https://github.com/searxng/searxng.git
synced 2026-09-23 06:36:12 +00:00
[feat] ci: oneway sync to CB (#6770)
This commit is contained in:
38
.github/workflows/sync.yml
vendored
Normal file
38
.github/workflows/sync.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
# yamllint disable rule:line-length
|
||||||
|
name: Sync
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
codeberg:
|
||||||
|
if: github.repository_owner == 'searxng'
|
||||||
|
name: Codeberg
|
||||||
|
runs-on: ubuntu-26.04-arm
|
||||||
|
steps:
|
||||||
|
- name: Sync
|
||||||
|
env:
|
||||||
|
ORIGIN: "github.com/searxng/searxng"
|
||||||
|
DESTINATION: "codeberg.org/searxng/searxng"
|
||||||
|
DESTINATION_USER: "${{ secrets.CODEBERG_USER }}"
|
||||||
|
DESTINATION_TOKEN: "${{ secrets.CODEBERG_TOKEN }}"
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
git init --quiet --bare .sync
|
||||||
|
cd .sync
|
||||||
|
|
||||||
|
git fetch --no-tags "https://${ORIGIN}.git" \
|
||||||
|
'+refs/heads/master:refs/heads/master'
|
||||||
|
|
||||||
|
git push --force "https://${DESTINATION_USER}:${DESTINATION_TOKEN}@${DESTINATION}.git" \
|
||||||
|
'refs/heads/master:refs/heads/master'
|
||||||
Reference in New Issue
Block a user