Files
smpp-js/.gitea/workflows/mirror.yaml
T
lilleman 14b114afda
Test / test (18) (pull_request) Successful in 18s
Mirror / push (push) Successful in 5s
Test / lint (pull_request) Successful in 20s
Test / test (22) (pull_request) Successful in 22s
Test / test (24) (pull_request) Successful in 17s
Test / test (26) (pull_request) Successful in 17s
Test / test (20) (pull_request) Successful in 18s
Split the GitHub mirror so Gitea creates its runs and no delete is dropped
2026-09-14 20:40:38 +02:00

30 lines
961 B
YAML

name: Mirror
on:
push:
schedule:
- cron: '17 3 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
push:
runs-on: ubuntu-24.04
timeout-minutes: 10
# Gitea 1.26 rolls back a run whose jobs share a group, so the delete job lives in mirror-delete.yaml.
concurrency:
group: mirror
steps:
- name: Push every branch and tag to GitHub, overwriting a same-named ref
env:
MIRROR_GITHUB_TOKEN: ${{ secrets.MIRROR_GITHUB_TOKEN }}
MIRROR_URL: https://github.com/larvit/smpp-js.git
SOURCE_URL: ${{ github.server_url }}/${{ github.repository }}.git
run: |
git clone --bare --quiet "$SOURCE_URL" mirror.git
git -C mirror.git -c credential.helper= \
-c credential.helper='!f() { echo username=x-access-token; echo "password=$MIRROR_GITHUB_TOKEN"; }; f' \
push "$MIRROR_URL" '+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'