Check Certificates (manage_certificates) #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Certificates | |
run-name: Check Certificates (${{ github.ref_name }}) | |
on: | |
workflow_dispatch: | |
jobs: | |
check_certs: | |
runs-on: ubuntu-latest | |
env: | |
FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }} | |
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }} | |
FASTLANE_KEY: ${{ secrets.FASTLANE_KEY }} | |
outputs: | |
cert_revoked: ${{ steps.set_output.outputs.cert_revoked }} # Job-level output | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
- name: Install dependencies | |
run: bundle install | |
- name: Check and Revoke Certificates | |
env: | |
FASTLANE_USER: ${{ secrets.APPLE_ID }} | |
FASTLANE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
run: bundle exec fastlane check_and_revoke_certificates | |
id: check_certs | |
- name: Set output based on Fastlane result | |
id: set_output | |
run: echo "::set-output name=cert_revoked::$(cat cert_revoked.txt)" # Output from Fastlane saved to a file | |
trigger_create_certs: | |
needs: check_certs | |
if: ${{ needs.check_certs.outputs.cert_revoked == 'true' }} | |
uses: ./.github/workflows/create_certs.yml |