代码之家  ›  专栏  ›  技术社区  ›  Eva

Github与AWS codecommit镜像和同步的操作

  •  1
  • Eva  · 技术社区  · 2 年前

    1.https://github.com/marketplace/actions/github-to-aws-codecommit-sync

    2.https://github.com/marketplace/actions/mirroring-repository

    3.https://github.com/marketplace/actions/automatic-repository-mirror

    1 回复  |  直到 2 年前
        1
  •  1
  •   VonC    2 年前

    第一个( actions/github-to-aws-codecommit-sync

    它的 script entrypoint.sh 是否:

    git config --global credential.'https://git-codecommit.*.amazonaws.com'.helper '!aws codecommit credential-helper $@'
    git remote add sync ${CodeCommitUrl}
    git push sync --mirror
    

    这将拉动所有分支,包括PR分支(在 refs/pull/ namespace )

    应该呼吁采取这一行动 merged PR

    name: OnMergedPR
    on:
      push:
        branches:
          - "**"
          - "!main"
    
      pull_request:
        branches:
          - main
        types: [opened, synchronize, closed]
    
      workflow_dispatch: 
    
    jobs:   
      build:
        if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true))
    
    ...