-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.07 KB
/
Copy pathmirror.yml
File metadata and controls
36 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# SPDX-License-Identifier: PMPL-1.0-or-later
name: Mirror to GitLab and Bitbucket
on:
push:
branches: [ main ]
permissions:
contents: read
jobs:
mirror:
name: Mirror repositories
runs-on: ubuntu-latest
if: github.repository == 'hyperpolymath/panic-attacker'
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Mirror to GitLab
if: vars.GITLAB_MIRROR_ENABLED == 'true'
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}
run: |
echo "Mirroring to GitLab..."
# git push --mirror https://oauth2:${GITLAB_TOKEN}@gitlab.com/hyperpolymath/panic-attacker.git
- name: Mirror to Bitbucket
if: vars.BITBUCKET_MIRROR_ENABLED == 'true'
env:
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_MIRROR_TOKEN }}
run: |
echo "Mirroring to Bitbucket..."
# git push --mirror https://x-token-auth:${BITBUCKET_TOKEN}@bitbucket.org/hyperpolymath/panic-attacker.git