From 38d4d2ecd6884e37435b593df52cff35240eb751 Mon Sep 17 00:00:00 2001 From: marionbarker Date: Tue, 6 Aug 2024 06:09:14 -0700 Subject: [PATCH 1/3] Add workflow nuke_cert.yml for Annual Certificates Reset --- .github/workflows/nuke_certs.yml | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/nuke_certs.yml diff --git a/.github/workflows/nuke_certs.yml b/.github/workflows/nuke_certs.yml new file mode 100644 index 000000000..c0c3d8236 --- /dev/null +++ b/.github/workflows/nuke_certs.yml @@ -0,0 +1,44 @@ +name: 9. Annual Certificates Reset +on: + workflow_dispatch: + +jobs: + nuke_certs: + runs-on: macos-14 + steps: + # Uncomment to manually select latest Xcode if needed + #- name: Select Latest Xcode + # run: "sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer" + + # Checks-out the repo + - name: Checkout Repo + uses: actions/checkout@v4 + + # 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" + + # Patch Fastlane Match nuke to not print tables + - name: Patch Nuke Tables + run: find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" "/ print_tables/d" + + # Patch Fastlane Match nuke to not print other misc messages + - name: Patch Other Nuke Info + run: | + find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Deleting profile /d' + find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Certificate /d' + find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Revoking certificate /d' + find /usr/local/lib/ruby/gems -name nuke.rb | xargs sed -i "" '/UI.message("Deleting file /d' + + # Remove all development certificates for Loop from Apple developer account + - name: Fastlane Nuke Certificates + run: fastlane nuke_certs + env: + TEAMID: ${{ secrets.TEAMID }} + GH_PAT: ${{ secrets.GH_PAT }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + FASTLANE_USER: ${{ secrets.FASTLANE_USER }} + FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }} + FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }} + FASTLANE_KEY: ${{ secrets.FASTLANE_KEY }} + FASTLANE_SKIP_ALL_LANE_SUMMARIES: "true" From d699925b8f4a3875a980a7e4d2b56409c0c0207a Mon Sep 17 00:00:00 2001 From: marionbarker Date: Tue, 6 Aug 2024 06:35:09 -0700 Subject: [PATCH 2/3] add run-name with branch to nuke_certs --- .github/workflows/nuke_certs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nuke_certs.yml b/.github/workflows/nuke_certs.yml index c0c3d8236..c2709a35d 100644 --- a/.github/workflows/nuke_certs.yml +++ b/.github/workflows/nuke_certs.yml @@ -1,4 +1,5 @@ name: 9. Annual Certificates Reset +run-name: Annual Certificates Reset (${{ github.ref_name }}) on: workflow_dispatch: From addd63e3135beca326432df29af8ca5bc39566d6 Mon Sep 17 00:00:00 2001 From: marionbarker Date: Fri, 9 Aug 2024 12:33:30 -0700 Subject: [PATCH 3/3] add validate to nuke_certs --- .github/workflows/nuke_certs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/nuke_certs.yml b/.github/workflows/nuke_certs.yml index c2709a35d..3bd1cdbc9 100644 --- a/.github/workflows/nuke_certs.yml +++ b/.github/workflows/nuke_certs.yml @@ -4,6 +4,11 @@ on: workflow_dispatch: jobs: + validate: + name: Validate + uses: ./.github/workflows/validate_secrets.yml + secrets: inherit + nuke_certs: runs-on: macos-14 steps: