File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Mirror To gemini-cli-extensions/flutter
2+
3+ on : [push, delete]
4+
5+ # Ensures that only one mirror job runs at a time per branch.
6+ # Cancels any in-progress job on the same branch if a new push occurs.
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.ref }}
9+ cancel-in-progress : true
10+
11+ jobs :
12+ mirror :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Setup SSH and Push to Mirror
21+ run : |
22+ # 1. Start the ssh-agent
23+ eval "$(ssh-agent -s)"
24+
25+ # 2. Add the SSH private key from the secret to the agent
26+ echo "${{ secrets.SSH_PRIVATE_KEY }}" | ssh-add -
27+
28+ # 3. Add GitHub's public SSH keys to the known_hosts file for security.
29+ # Keys are sourced from:
30+ # https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints
31+ mkdir -p ~/.ssh
32+ echo "
33+ github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" >> ~/.ssh/known_hosts
34+
35+ # 4. Push to the destination repository
36+ git push --mirror git@github.com:gemini-cli-extensions/flutter.git
You can’t perform that action at this time.
0 commit comments