Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/mirror_gitee.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
name: Mirror to Gitee Repo

# Ref creation is also delivered as a push event, but deletion may only emit a
# delete event. Keep both triggers so removed branches and tags are pruned from
# the mirror without launching duplicate mirrors for ref creation.
on:
push:
branches-ignore:
- "copilot/**"
- "dependabot/**"
- "pre-commit-ci-update-config"
# Use positive patterns with exclusions so tag pushes can be listed below.
# `branches-ignore` by itself disables all tag-triggered runs.
branches:
- "**"
# GitHub creates these ephemeral refs while testing a merge queue entry.
# They are neither source branches nor refs that Gitee should receive.
- "!gh-readonly-queue/**"
- "!copilot/**"
- "!dependabot/**"
- "!pre-commit-ci-update-config"
tags:
- "**"
delete:
create:

# Ensures that only one mirror task will run at a time.
concurrency:
group: git-mirror

jobs:
git-mirror:
if: github.repository_owner == 'deepmodeling'
runs-on: ubuntu-slim
# Delete events use the default branch as `github.ref`, so inspect the
# payload ref to suppress only ephemeral merge-queue branch deletions.
if: >-
github.repository_owner == 'deepmodeling' &&
(github.event_name != 'delete' ||
!startsWith(github.event.ref, 'gh-readonly-queue/'))
# This is a Docker action; ubuntu-slim does not provide a Docker daemon.
runs-on: ubuntu-latest
steps:
- uses: wearerequired/git-mirror-action@v1
env:
Expand Down
Loading