From 81a3d9b03305a4b2a844bd6bac14a14f27626fef Mon Sep 17 00:00:00 2001 From: bjornoleh <63544115+bjornoleh@users.noreply.github.com> Date: Sun, 10 Dec 2023 15:56:36 +0100 Subject: [PATCH] Sync the GitHub runner clock with the Windows time server (#99) Adding a step to workflow jobs that interface Apple servers, as a workaround for build issues caused by runner clocks being out of sync. See https://github.com/actions/runner issue number 2996 for details. name: Sync clock run: sudo sntp -sS time.windows.com Added to the following workflows / jobs: validate_secrets.yml / validate-fastlane-secrets add_identifiers.yml / identifiers build_loop.yml / build create_certs.yml / certificates --- .github/workflows/add_identifiers.yml | 6 +++++- .github/workflows/build_loop.yml | 4 ++++ .github/workflows/create_certs.yml | 6 +++++- .github/workflows/validate_secrets.yml | 4 ++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/add_identifiers.yml b/.github/workflows/add_identifiers.yml index 62a2b543f..e780f9c97 100644 --- a/.github/workflows/add_identifiers.yml +++ b/.github/workflows/add_identifiers.yml @@ -23,7 +23,11 @@ jobs: # Patch Fastlane Match to not print tables - name: Patch Match Tables run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d" - + + # Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996) + - name: Sync clock + run: sudo sntp -sS time.windows.com + # Create or update identifiers for app - name: Fastlane Provision run: fastlane identifiers diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index abd7d4f2f..c759354ad 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -33,6 +33,10 @@ jobs: - name: Patch Match Tables run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d" + # Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996) + - name: Sync clock + run: sudo sntp -sS time.windows.com + # Build signed Loop IPA file - name: Fastlane Build & Archive run: fastlane build_loop diff --git a/.github/workflows/create_certs.yml b/.github/workflows/create_certs.yml index 82961983c..e0a29af48 100644 --- a/.github/workflows/create_certs.yml +++ b/.github/workflows/create_certs.yml @@ -23,7 +23,11 @@ jobs: # Patch Fastlane Match to not print tables - name: Patch Match Tables run: find /usr/local/lib/ruby/gems -name table_printer.rb | xargs sed -i "" "/puts(Terminal::Table.new(params))/d" - + + # Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996) + - name: Sync clock + run: sudo sntp -sS time.windows.com + # Create or update certificates for app - name: Create Certificates run: fastlane certs diff --git a/.github/workflows/validate_secrets.yml b/.github/workflows/validate_secrets.yml index 70401888c..28ce8d595 100644 --- a/.github/workflows/validate_secrets.yml +++ b/.github/workflows/validate_secrets.yml @@ -10,6 +10,10 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + # Sync the GitHub runner clock with the Windows time server (workaround as suggested in https://github.com/actions/runner/issues/2996) + - name: Sync clock + run: sudo sntp -sS time.windows.com + # Validates the repo secrets - name: Validate Secrets run: |