Skip to content

Commit e014a76

Browse files
committed
Use different approach to clone git repo
1 parent 8ee1a8d commit e014a76

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

‎.github/workflows/commit-delta-puppet-repo.yml‎

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,30 @@ on:
33
push:
44
branches:
55
- master
6+
env:
7+
REMOTE: ProjectIgnis/DeltaBagooska.git
8+
REPO_NAME: DeltaBagooska
9+
DESTINATION: DeltaBagooska/script
10+
BASE_SHA: 20250420
611
jobs:
712
commit:
813
runs-on: ubuntu-latest
9-
env:
10-
REMOTE: ProjectIgnis/DeltaBagooska.git
11-
REPO_NAME: DeltaBagooska
12-
DESTINATION: DeltaBagooska/script
13-
BASE_SHA: 20250420
1414
steps:
15-
- uses: actions/checkout@v1
16-
- name: Clone destination repository
17-
run: |
18-
cd $HOME
19-
git clone https://${{ secrets.DEPLOY_TOKEN_BAGOOSKA }}@github.com/$REMOTE
20-
mkdir -p $DESTINATION
15+
- uses: actions/checkout@v7
16+
with:
17+
fetch-depth: 0
18+
- name: Clone Delta repository
19+
uses: actions/checkout@v7
20+
with:
21+
repository: ${{ env.REMOTE }}
22+
path: DeltaBagooska
23+
ref: 'master'
24+
token: ${{ secrets.DEPLOY_TOKEN_BAGOOSKA }}
2125
- name: Copy new or changed files
2226
id: copy
2327
run: |
28+
mv $REPO_NAME $HOME/
29+
mkdir -p $HOME/$DESTINATION
2430
c1grep() { grep "$@" || test $? = 1; }
2531
mv $HOME/$DESTINATION /tmp
2632
mkdir -p $HOME/$DESTINATION
@@ -54,6 +60,7 @@ jobs:
5460
CEMAIL=$(git log -1 --pretty=format:'%ce')
5561
cd $HOME/$DESTINATION
5662
echo $GITHUB_SHA > VERSION
63+
rm -f ~/.gitconfig /etc/gitconfig
5764
git config user.email "$CEMAIL"
5865
git config user.name "$COMMITTER"
5966
git add -A .

0 commit comments

Comments
 (0)