Skip to content

Commit 9845732

Browse files
Archive dbatools repo as tar.gz in CI workflow
The workflow now creates a tar.gz archive of the dbatools repository, including dot files and excluding .git, before uploading as an artifact. On download, the archive is extracted to restore the repo. This ensures all necessary files, including hidden ones, are preserved in the artifact.
1 parent 0a1f74d commit 9845732

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/build-release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,17 @@ jobs:
3636
- name: Clone appveyor repo
3737
run: git clone https://github.com/dataplat/appveyor-lab.git appveyor-lab
3838

39+
- name: Create tar archive with dot files
40+
run: |
41+
cd dbatools
42+
tar -czf ../dbatools-repo.tar.gz --exclude='.git' .
43+
cd ..
44+
3945
- name: Upload dbatools repo artifact
4046
uses: actions/upload-artifact@v4
4147
with:
4248
name: dbatools-repo
43-
path: dbatools
49+
path: dbatools-repo.tar.gz
4450

4551
- name: Upload appveyor repo artifact
4652
uses: actions/upload-artifact@v4
@@ -170,7 +176,11 @@ jobs:
170176
uses: actions/download-artifact@v4
171177
with:
172178
name: dbatools-repo
173-
path: dbatools
179+
180+
- name: Extract dbatools repo
181+
run: |
182+
mkdir -p dbatools
183+
tar -xzf dbatools-repo.tar.gz -C dbatools
174184
175185
- name: Download appveyor repo artifact
176186
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)