mirror of
https://github.com/armbian/build.git
synced 2026-01-06 09:58:46 -08:00
- Remove redundant daily cron schedule (already runs on push to main) - Add concurrency control to cancel old runs - Improve formatting and add clarifying comments - Add push trigger for main branch
35 lines
840 B
YAML
35 lines
840 B
YAML
# Pushes the contents of the repo to the Codeberg mirror
|
|
name: Mirror to Codeberg
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
# Cancel older runs if a new one starts (per workflow + branch)
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
codeberg:
|
|
# Extra safety so forks don't try to run it
|
|
if: ${{ github.repository == 'armbian/build' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout full history
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Mirror to Codeberg
|
|
uses: pixta-dev/repository-mirroring-action@v1
|
|
with:
|
|
target_repo_url: git@codeberg.org:armbian/build.git
|
|
ssh_private_key: ${{ secrets.GHA_SSH_KEY }}
|