Skip to content

Commit

Permalink
actions: fix wait for signed gam.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
jay0lee committed Sep 24, 2024
1 parent bd5149d commit 0dd74e2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0dd74e2

Please sign in to comment.