Skip to content

Commit 4d126ed

Browse files
committed
chore: update mirror workflow to use actions/checkout and fetch remote branch directly
1 parent 8cbd986 commit 4d126ed

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/mirror-branch.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ jobs:
88
mirror:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Sync Branch
11+
- name: Checkout destination
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Sync branch
1217
run: |
13-
git clone --single-branch --branch 2.x https://git.drupalcode.org/project/bricks.git temp_dir
14-
cd temp_dir
15-
git remote add github https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
16-
git push github 2.x --force
18+
git remote add external https://git.drupalcode.org/project/bricks.git
19+
git fetch external 2.x
20+
git push origin external/2.x:refs/heads/2.x --force

0 commit comments

Comments
 (0)