Skip to content

Commit 810ff67

Browse files
committed
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
1 parent b397590 commit 810ff67

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed
Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
# Pushes the contents of the repo to the Codeberg mirror
22
name: Mirror to Codeberg
3+
34
permissions:
45
contents: read
6+
57
on:
8+
push:
9+
branches:
10+
- main
611
workflow_dispatch:
7-
schedule:
8-
- cron: '30 4 * * *' # Daily at 4:30
12+
13+
# Cancel older runs if a new one starts (per workflow + branch)
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
918
jobs:
1019
codeberg:
20+
# Extra safety so forks don't try to run it
1121
if: ${{ github.repository == 'armbian/build' }}
1222
runs-on: ubuntu-latest
23+
1324
steps:
14-
- uses: actions/checkout@v6
15-
with: { fetch-depth: 0 }
16-
- uses: pixta-dev/repository-mirroring-action@v1
25+
- name: Checkout full history
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Mirror to Codeberg
31+
uses: pixta-dev/repository-mirroring-action@v1
1732
with:
1833
target_repo_url: [email protected]:armbian/build.git
1934
ssh_private_key: ${{ secrets.GHA_SSH_KEY }}

0 commit comments

Comments
 (0)