Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 350ed1f

Browse files
test-progess-sha-calc
1 parent 91b310d commit 350ed1f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/dump.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ jobs:
66
steps:
77
- name: Dump Image
88
run: |
9-
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/${{ github.repository }}/releases -d '{"tag_name":"v0.${{ github.run_id }}.${{ github.run_attempt }}","target_commitish":"main","name":"v0.${{ github.run_id }}.${{ github.run_attempt }}","body":"Dump of runner image","draft":true,"prerelease":false,"generate_release_notes":false}' "--output" resp.json
10-
11-
cat resp.json
12-
$releaseid = (cat resp.json | ConvertFrom-Json).id
13-
echo "release=$releaseid"
14-
15-
sudo tar -cf "--exclude=$GITHUB_WORKSPACE" "--exclude=/proc" "--exclude=/dev" "--exclude=/run" "--exclude=/var/run" "--exclude=/var/lib/docker" / | curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" -H "Content-Type: application/octet-stream" "https://uploads.github.com/repos/${{ github.repository }}/releases/$releaseid/assets?name=image.tar" "--data-binary" "@-"
16-
shell: pwsh
9+
touch sha.txt
10+
sudo tar -cf "--exclude=$GITHUB_WORKSPACE" "--exclude=/proc" "--exclude=/dev" "--exclude=/run" "--exclude=/var" / | pv | tee >(sha256sum > sha.txt) | tar -t
11+
echo "Sha is"
12+
cat sha.txt
13+
shell: bash

0 commit comments

Comments
 (0)