|
| 1 | +# // Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
1 | 2 | # SPDX-License-Identifier: MPL-2.0 |
2 | 3 | name: Mirror to Git Forges |
3 | 4 | on: |
|
15 | 16 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
16 | 17 | with: |
17 | 18 | fetch-depth: 0 |
18 | | - - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
| 19 | + - if: ${{ env.SSH_PRIVATE_KEY != '' }} |
| 20 | + uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
19 | 21 | with: |
20 | 22 | ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }} |
21 | 23 | - name: Mirror to GitLab |
|
31 | 33 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
32 | 34 | with: |
33 | 35 | fetch-depth: 0 |
34 | | - - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
| 36 | + - if: ${{ env.SSH_PRIVATE_KEY != '' }} |
| 37 | + uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
35 | 38 | with: |
36 | 39 | ssh-private-key: ${{ secrets.BITBUCKET_SSH_KEY }} |
37 | 40 | - name: Mirror to Bitbucket |
|
47 | 50 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
48 | 51 | with: |
49 | 52 | fetch-depth: 0 |
50 | | - - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
| 53 | + - if: ${{ env.SSH_PRIVATE_KEY != '' }} |
| 54 | + uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
51 | 55 | with: |
52 | 56 | ssh-private-key: ${{ secrets.CODEBERG_SSH_KEY }} |
53 | 57 | - name: Mirror to Codeberg |
|
63 | 67 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
64 | 68 | with: |
65 | 69 | fetch-depth: 0 |
66 | | - - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
| 70 | + - if: ${{ env.SSH_PRIVATE_KEY != '' }} |
| 71 | + uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
67 | 72 | with: |
68 | 73 | ssh-private-key: ${{ secrets.SOURCEHUT_SSH_KEY }} |
69 | 74 | - name: Mirror to SourceHut |
|
79 | 84 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
80 | 85 | with: |
81 | 86 | fetch-depth: 0 |
82 | | - - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
| 87 | + - if: ${{ env.SSH_PRIVATE_KEY != '' }} |
| 88 | + uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
83 | 89 | with: |
84 | 90 | ssh-private-key: ${{ secrets.DISROOT_SSH_KEY }} |
85 | 91 | - name: Mirror to Disroot |
|
95 | 101 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
96 | 102 | with: |
97 | 103 | fetch-depth: 0 |
98 | | - - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
| 104 | + - if: ${{ env.SSH_PRIVATE_KEY != '' }} |
| 105 | + uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0 |
99 | 106 | with: |
100 | 107 | ssh-private-key: ${{ secrets.GITEA_SSH_KEY }} |
101 | 108 | - name: Mirror to Gitea |
|
0 commit comments