File tree Expand file tree Collapse file tree 4 files changed +72
-2
lines changed
Expand file tree Collapse file tree 4 files changed +72
-2
lines changed Original file line number Diff line number Diff line change 1+ # File: .github/actions/download-tar/action.yml
2+ name : Download Tar Artifact
3+ description : >
4+ Download and extract a tar artifact that was previously uploaded in the workflow by the upload-tar
5+ action
6+
7+ inputs :
8+ name :
9+ description : Artifact name
10+ path :
11+ description : Destination path
12+ required : false
13+
14+ runs :
15+ using : composite
16+ steps :
17+ 18+ with :
19+ name : ${{ inputs.name }}
20+ path : ${{ inputs.path }}
21+
22+ - run : ${{ github.action_path }}/untar.sh "${{ inputs.name }}"
23+ working-directory : ${{ inputs.path }}
24+ shell : bash
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # File: .github/actions/download-tar/untar.sh
3+ set -x
4+ name=" $1 "
5+
6+ if [[ " $name " == ' ' ]]; then
7+ dirs=(* /)
8+ else
9+ dirs=(.)
10+ fi
11+
12+ for dir in ${dirs[@]} ; do
13+ echo " > Extracting: $dir "
14+ pushd " $dir " > /dev/null
15+ tar xvf artifact.tar
16+ rm artifact.tar
17+ popd > /dev/null
18+ done
Original file line number Diff line number Diff line change 1+ # File: .github/actions/upload-tar/action.yml
2+ name : Upload Tar Artifact
3+ description : Compress files with tar prior to artifacting to keep file privileges.
4+
5+ inputs :
6+ name :
7+ description : Artifact name
8+ path :
9+ description : A directory path. The contents of that directory will be tarballed and uploaded.
10+ required : true
11+
12+ runs :
13+ using : composite
14+ steps :
15+
16+ - run : tar cvf artifact.tar *
17+ shell : bash
18+ working-directory : ${{ inputs.path }}
19+
20+ 21+ with :
22+ name : ${{ inputs.name }}
23+ path : ${{ inputs.path }}/artifact.tar
24+ overwrite : true
25+
26+ - run : rm artifact.tar
27+ shell : bash
28+ working-directory : ${{ inputs.path }}
Original file line number Diff line number Diff line change 6767 ./build.hs
6868
6969 - name : 🚢 Upload artifact
70- uses : actions/upload-artifact@v3
70+ uses : ./.github/ actions/upload-tar
7171 with :
7272 name : db-server-${{ steps.tag.outputs.value }}-${{ matrix.arch }}-${{ matrix.os }}
7373 path : |
74- bin/db-server
74+ ./ bin/
You can’t perform that action at this time.
0 commit comments