-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actions: fix wait for signed gam.exe
- Loading branch information
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -646,18 +646,19 @@ jobs: | |
$gam user [email protected] add drivefile localfile "$gam" parentid "$folder_id" | ||
$gam user [email protected] update drivefile "$folder_id" newfilename "READYTOSIGN ${folder_number}" | ||
export signed_folder="SIGNED ${folder_number}" | ||
export results_file="results-$(date +%s)" | ||
zero_results="[email protected],0" | ||
while true; do | ||
$gam user gam-win-signer print filelist query "name = '${signed_folder}' and '1Xz3hYq4Mfa_r6D8EcBZHLDtHDFurYSvp' in parents and mimeType = 'application/vnd.google-apps.folder'" id > "$results_file" | ||
export result_lines=$(wc -l < "$results_file") | ||
if [[ "$result_lines" -gt "1" ]]; then | ||
echo "We have signed results." | ||
result_counts=$($gam user gam-win-signer print filelist query "name = '${signed_folder}' and '1Xz3hYq4Mfa_r6D8EcBZHLDtHDFurYSvp' in parents and mimeType = 'application/vnd.google-apps.folder'" countsonly) | ||
echo "$result_counts" | ||
if [[ ! "$result_counts" =~ "$zero_results" ]]; then | ||
echo "looks like we have results" | ||
break | ||
fi | ||
echo "Sleeping 10 seconds before checking for results again." | ||
echo "no results, sleeping 10..." | ||
sleep 10 | ||
done | ||
$gam csv "$results_file" gam user [email protected] print filelist query "'~~id~~' in parents and name = 'gam.exe'" id | $gam csv - gam user [email protected] get drivefile ~id targetfolder "$gampath" targetfile "gam.exe" overwrite true acknowledgeabuse true | ||
$gam user gam-win-signer print filelist query "name = '${signed_folder}' and '1Xz3hYq4Mfa_r6D8EcBZHLDtHDFurYSvp' in parents and mimeType = 'application/vnd.google-apps.folder'" id | $gam csv - gam user [email protected] print filelist query "'~~id~~' in parents and name = 'gam.exe'" id | $gam csv - gam user [email protected] get drivefile ~id targetfolder "$gampath" targetfile "gam.exe" overwrite true acknowledgeabuse true | ||
signtool verify /v "$gam" | ||
- name: Attest gam executable was generated from this Action | ||
uses: actions/attest-build-provenance@v1 | ||
|