Skip to content

Commit 18405cc

Browse files
author
Greg Bowler
committed
ci: fix security vulnerability with build archive
1 parent aed6756 commit 18405cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
php_version: ${{ matrix.php }}
2525

2626
- name: Archive build
27-
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
27+
run: mkdir /tmp/github-actions/ && tar --exclude=".git" -cvf /tmp/github-actions/build.tar ./
2828

2929
- name: Upload build archive for test runners
3030
uses: actions/upload-artifact@v4
@@ -167,7 +167,7 @@ jobs:
167167
env:
168168
GH_TOKEN: ${{ github.token }}
169169
run: |
170-
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
170+
gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
171171
while read id
172172
do
173173
echo -n "Deleting artifact ID $id ... "

0 commit comments

Comments
 (0)