76
76
- name : Find backup file version
77
77
id : file
78
78
run : |
79
- file_version="{{ inputs.version }}"
79
+ file_version={{ inputs.version }}
80
+ size={{ inputs.size }}}
80
81
echo "$file_version"
81
82
V3_8_COMPATIBLE="3.6 3.7 3.8 3.9 3.10"
82
83
85
86
if [ $? -eq 0 ]; then
86
87
echo "Version $file_version is acceptable"
87
88
echo "version=3.8" >> $GITHUB_OUTPUT
89
+ echo "name=v$version-$size.tar.gz" >> $GITHUB_OUTPUT
88
90
else
89
91
echo "Version $file_version is not acceptable"
90
92
exit 1
@@ -93,12 +95,11 @@ jobs:
93
95
- name : Download from blob storage
94
96
run : |
95
97
mkdir ghes-data
96
- filename="v{{ steps.file.outputs.version }}-{{ inputs.size }}.tar.gz"
97
98
az storage blob download \
98
99
--account-name ghesresults \
99
100
--container-name ghes-data \
100
- --name "$filename" \
101
- --file " ghes-data/$filename" \
101
+ --name {{ steps.file.outputs.name }} \
102
+ --file ghes-data/{{ steps.file.outputs.name }} \
102
103
--connection-string "${{ secrets.CONNECTIONSTRING }}"
103
104
104
105
- name : Unzip backup and setup symlink
@@ -107,8 +108,7 @@ jobs:
107
108
dir_name=$(date +%s)
108
109
mkdir "$HOME/ghe-backup-data/$dir_name"
109
110
110
- filename="v{{ steps.file.outputs.version }}-{{ inputs.size }}.tar.gz"
111
- tar -xvf "ghes-data/$filename" -C "$HOME/ghe-backup-data/$dir_name"
111
+ tar -xvf ghes-data/{{ steps.file.outputs.name }} -C "$HOME/ghe-backup-data/$dir_name"
112
112
113
113
ln -s "$dir_name" "$HOME/ghe-backup-data/current"
114
114
0 commit comments