forked from LoopKit/LoopWorkspace
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.35 KB
/
check_certs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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_expired: ${{ steps.set_output.outputs.cert_expired }} # Job-level output for expired certificates
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 Certificates
env:
FASTLANE_USER: ${{ secrets.APPLE_ID }}
FASTLANE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
run: bundle exec fastlane check_and_notify_certificates
id: check_certs
- name: Set output based on Fastlane result
id: set_output
run: |
if [ -f cert_expired.txt ]; then
echo "cert_expired=$(cat cert_expired.txt)" >> $GITHUB_ENV
else
echo "cert_expired=false" >> $GITHUB_ENV
fi
trigger_create_certs:
needs: check_certs
if: ${{ needs.check_certs.outputs.cert_expired == 'true' }}
uses: ./.github/workflows/create_certs.yml