Files
build/.github/workflows/mirror_to_codeberg.yml
Igor Pecovnik 810ff67c90 chore: cleanup mirror_to_codeberg.yml workflow
- 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
2025-12-26 15:42:35 +01:00

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 }}