From eb9270069341229679ad93d17936e490da976c9c Mon Sep 17 00:00:00 2001 From: mikael Date: Wed, 25 Mar 2026 10:16:34 +0100 Subject: [PATCH] Fix workflow bugs and reduce duplication - Fix FORCE_NUKE_CERTS variable expansion in create_certs.yml (was never expanded, warning annotation never displayed) - Extract duplicated Patch Match Tables code from 3 workflows into a reusable composite action - Extend .gitignore with build artifacts, secrets, fastlane temp files, and .claude/ local config Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/actions/patch-match-tables/action.yml | 15 +++++++++++++++ .github/workflows/add_identifiers.yml | 9 +-------- .github/workflows/build_loop.yml | 9 +-------- .github/workflows/create_certs.yml | 11 ++--------- .gitignore | 15 +++++++++++++++ 5 files changed, 34 insertions(+), 25 deletions(-) create mode 100644 .github/actions/patch-match-tables/action.yml diff --git a/.github/actions/patch-match-tables/action.yml b/.github/actions/patch-match-tables/action.yml new file mode 100644 index 0000000000..cc1629848e --- /dev/null +++ b/.github/actions/patch-match-tables/action.yml @@ -0,0 +1,15 @@ +name: Patch Match Tables +description: Patch Fastlane Match to not print tables + +runs: + using: composite + steps: + - shell: bash + run: | + TABLE_PRINTER_PATH=$(ruby -e 'puts Gem::Specification.find_by_name("fastlane").gem_dir')/match/lib/match/table_printer.rb + if [ -f "$TABLE_PRINTER_PATH" ]; then + sed -i "" "/puts(Terminal::Table.new(params))/d" "$TABLE_PRINTER_PATH" + else + echo "table_printer.rb not found" + exit 1 + fi diff --git a/.github/workflows/add_identifiers.yml b/.github/workflows/add_identifiers.yml index 6661ba30c9..56e49e5712 100644 --- a/.github/workflows/add_identifiers.yml +++ b/.github/workflows/add_identifiers.yml @@ -20,14 +20,7 @@ jobs: # Patch Fastlane Match to not print tables - name: Patch Match Tables - run: | - TABLE_PRINTER_PATH=$(ruby -e 'puts Gem::Specification.find_by_name("fastlane").gem_dir')/match/lib/match/table_printer.rb - if [ -f "$TABLE_PRINTER_PATH" ]; then - sed -i "" "/puts(Terminal::Table.new(params))/d" "$TABLE_PRINTER_PATH" - else - echo "table_printer.rb not found" - exit 1 - fi + uses: ./.github/actions/patch-match-tables # Install project dependencies - name: Install Project Dependencies diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index db33b8991b..79f7c0c166 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -213,14 +213,7 @@ jobs: # Patch Fastlane Match to not print tables - name: Patch Match Tables - run: | - TABLE_PRINTER_PATH=$(ruby -e 'puts Gem::Specification.find_by_name("fastlane").gem_dir')/match/lib/match/table_printer.rb - if [ -f "$TABLE_PRINTER_PATH" ]; then - sed -i "" "/puts(Terminal::Table.new(params))/d" "$TABLE_PRINTER_PATH" - else - echo "table_printer.rb not found" - exit 1 - fi + uses: ./.github/actions/patch-match-tables # Install project dependencies - name: Install Project Dependencies diff --git a/.github/workflows/create_certs.yml b/.github/workflows/create_certs.yml index d20001b2ca..c5f5d3a02c 100644 --- a/.github/workflows/create_certs.yml +++ b/.github/workflows/create_certs.yml @@ -33,14 +33,7 @@ jobs: # Patch Fastlane Match to not print tables - name: Patch Match Tables - run: | - TABLE_PRINTER_PATH=$(ruby -e 'puts Gem::Specification.find_by_name("fastlane").gem_dir')/match/lib/match/table_printer.rb - if [ -f "$TABLE_PRINTER_PATH" ]; then - sed -i "" "/puts(Terminal::Table.new(params))/d" "$TABLE_PRINTER_PATH" - else - echo "table_printer.rb not found" - exit 1 - fi + uses: ./.github/actions/patch-match-tables # Install project dependencies - name: Install Project Dependencies @@ -83,7 +76,7 @@ jobs: exit 1 fi # Check if vars.FORCE_NUKE_CERTS is not set to true - if [ vars.FORCE_NUKE_CERTS = "true" ]; then + if [ "${{ vars.FORCE_NUKE_CERTS }}" = "true" ]; then echo "::warning::‼️ Nuking of certificates was forced because the repository variable FORCE_NUKE_CERTS is set to 'true'." fi # Nuke Certs if needed, and if the repository variable ENABLE_NUKE_CERTS is set to 'true', or if FORCE_NUKE_CERTS is set to 'true', which will always force certs to be nuked diff --git a/.gitignore b/.gitignore index 02b598dfb4..e24e1bfc71 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,18 @@ xcuserdata/ *.playground playground.xcworkspace timeline.xctimeline + +## Build artifacts +buildlog/ +artifacts/ + +## Secrets / environment +.env +.env.* + +## Claude Code local config +.claude/ + +## Fastlane temp +fastlane/new_certificate_needed.txt +fastlane/report.xml