From 7bc031ea564c2d0b02faa875d99f0da005bd2c94 Mon Sep 17 00:00:00 2001 From: Billy Booth Date: Sat, 16 Sep 2023 11:26:16 -0500 Subject: [PATCH 1/2] Don't install bundler, which comes with Ruby 2.7+ --- .github/workflows/build_loop.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index 9e037dd7d8..cec2aaadec 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -251,12 +251,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" - # Install Bundler and project dependencies - - name: Install Bundler and project dependencies - run: | - gem install bundler - bundle install - + # Install project dependencies + - name: Install project dependencies + run: bundle install + # Build signed Loop IPA file - name: Fastlane Build & Archive run: bundle exec fastlane build_loop From 1202b910b1902a5ef64bd5a6e1e551bc0c2c6212 Mon Sep 17 00:00:00 2001 From: Billy Booth Date: Sat, 16 Sep 2023 11:35:35 -0500 Subject: [PATCH 2/2] Install dependencies and use bundler to exec fastlane across workflows --- .github/workflows/add_identifiers.yml | 10 +++++++--- .github/workflows/create_certs.yml | 10 +++++++--- .github/workflows/validate_secrets.yml | 7 +++++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/add_identifiers.yml b/.github/workflows/add_identifiers.yml index 868ca857d1..c57e72960e 100644 --- a/.github/workflows/add_identifiers.yml +++ b/.github/workflows/add_identifiers.yml @@ -21,14 +21,18 @@ jobs: # Checks-out the repo - name: Checkout Repo uses: actions/checkout@v3 - + # 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" - + + # Install project dependencies + - name: Install Project Dependencies + run: bundle install + # Create or update identifiers for app - name: Fastlane Provision - run: fastlane identifiers + run: bundle exec fastlane identifiers env: TEAMID: ${{ secrets.TEAMID }} GH_PAT: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/create_certs.yml b/.github/workflows/create_certs.yml index a5e076ffaa..faa62b32ce 100644 --- a/.github/workflows/create_certs.yml +++ b/.github/workflows/create_certs.yml @@ -21,14 +21,18 @@ jobs: # Checks-out the repo - name: Checkout Repo uses: actions/checkout@v3 - + # 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" - + + # Install project dependencies + - name: Install Project Dependencies + run: bundle install + # Create or update certificates for app - name: Create Certificates - run: fastlane certs + run: bundle exec fastlane certs env: TEAMID: ${{ secrets.TEAMID }} GH_PAT: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/validate_secrets.yml b/.github/workflows/validate_secrets.yml index 835217fb5d..6f3f4c746f 100644 --- a/.github/workflows/validate_secrets.yml +++ b/.github/workflows/validate_secrets.yml @@ -124,7 +124,10 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 - + + - name: Install Project Dependencies + run: bundle install + - name: Validate Fastlane Secrets run: | # Validate Fastlane Secrets @@ -171,7 +174,7 @@ jobs: elif ! echo "$FASTLANE_KEY" | openssl pkcs8 -nocrypt >/dev/null; then failed=true echo "::error::The FASTLANE_KEY secret is set but invalid. Verify that you copied it correctly from the API Key file (*.p8) you downloaded and try again." - elif ! fastlane validate_secrets 2>&1 | tee fastlane.log; then + elif ! bundle exec fastlane validate_secrets 2>&1 | tee fastlane.log; then if grep -q "bad decrypt" fastlane.log; then failed=true echo "::error::Unable to decrypt the Match-Secrets repository using the MATCH_PASSWORD secret. Verify that it is set correctly and try again."